title: XcodeKit and SourceKit
body: <p>I don't have experience in XcodeKit and SourceKit apart from a few articles that I read and the official pages 
  <a href="https://developer.apple.com/documentation/xcodekit#topics" rel="noreferrer">https://developer.apple.com/documentation/xcodekit#topics</a>
  <a href="https://github.com/apple/swift/tree/master/tools/SourceKit" rel="noreferrer">https://github.com/apple/swift/tree/master/tools/SourceKit</a></p>
  
  <p>I'm trying to understand the differences between the two and what they are capable of doing exactly.</p>
  
  <p>I think XcodeKit essentially let you add commands to Xcode menu and makes it possible to interact with the source code you have open by creating an app extension which you can then also distribute through the App Store.
  As far as I could understand XcodeKit only let you get information from the current focused file (not all the files in project), then you can get selected text etc... At least that's what I read until Xcode 9, not sure if things are better now.</p>
  
  <p>SourceKit also interacts with source code but looks like more powerful but more low level.</p>
  
  <p>What I'm wondering is:</p>
  
  <ul>
  <li>Does SourceKit make it possible to access to all the Swift and ObjC classes that you have in your open project, and then extract informations out of it? 
  For example let's say that I want to extract informations like structs and classes, methods of each class, and then generate some sort of output out of it.
  How do I use SourceKit (or XcodeKit?) to do that?</li>
  <li>Any link to examples would be great!</li>
  <li>Is SourceKit still actual and supported by Apple?</li>
  </ul>
  
  <p><a href="https://github.com/apple/swift/blob/master/tools/SourceKit/docs/Protocol.md" rel="noreferrer">https://github.com/apple/swift/blob/master/tools/SourceKit/docs/Protocol.md</a></p>
  
  <p>Thanks</p>