Skip to content

Generating Swift Interface Files

Travis Prescott edited this page Jul 21, 2021 · 4 revisions

NOTE

We now have APIView support for Swift. You should no longer generate *.swiftinterface files for API reviews.


It can be helpful to see the Swift interface without all of the comments and implementation. To do that:

  • Ensure the BUILD_LIBRARY_FOR_DISTRIBUTION setting in the Xcode project file is set to YES.
  • Build the product in XCode. Expand the Products folder and select the generated framework. In the File Inspector tab of the right-most collapsible pane of Xcode, there will be a link to the full path. Click the right arrow icon to open the Finder to the built framework's location. Inside this folder, go to Modules and then the folder that ends with .swiftmodule. Here you will find the file you need, which will look like x86_64.swiftinterface.
Clone this wiki locally