From the first beta of Swift, we were able to see the Swift interface for the module through an interactive process. You start with a Swift file in an Xcode project, right-click on the symbol and select "Go to Definition"; Xcode will generate an ad file.
This procedure is a bit tedious. This is a very guide; You should start with a Swift file in your Xcode project; and you must know the name of the symbol in advance. It does not generate all declarations in the module — if the module was defined in Objective-C, it only displays declarations from a single .h file.
I learned about the command line swift-ide test tool in Beta 3 through http://www.jpsim.com/uncovering-sourcekit/ . Using the following command, I could generate declarations for the entire structure:
xcrun swift-ide-test -print-module -source-filename /dev/null \ -sdk /Applications/Xcode6-Beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk \ -print-regular-comments -module-print-submodules -module-to-print CoreGraphics
However, in beta 4, the quick pick-fade command disappeared.
Does anyone know a new way to automatically create Swift declarations through the command line?
source share