Command Line Tool - Can't link to custom Swift Framework

With OS X Yosemite and Xcode 6, it was not possible to build a Swift command line tool that link to my own made or third party Swift Frameworks.

Chris Lattner well explained in June 2014 to the community that we have to wait for ABI to reach the required level of stability, and because subject to change, the Swift libraries must be embedded in each app. Since a a Command Line Tool is not a bundle, we can't embed binaries.


Fast forward today June 2015 we have OS X El Capitan beta, Xcode 7 beta and Swift 2.0.

Under Yosemite, using Xcode 7 I recompiled my stuff to Swift 2.0 but I still can't link my Command Line Tool to the Swift Framework.


Is someone have do similar build with success ? Do I need to build and run my Coammand Line Tool under El Capitan ?

If its still not possible, I would like to know when the Swift ABI is planned for enough satbility and sytem level availabilty ?

Thanks,

Datagram

I'm in the same boat. Trying to build a command-line tool using frameworks that rely on swift, and it does not work at all. Did you get any luck with this?

Also waiting on this!

If its still not possible, I would like to know when the Swift ABI is planned for enough satbility and sytem level availabilty ?

There’s still no official timeline for a stable Swift ABI.

Share and Enjoy

Quinn "The Eskimo!"
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

I have been able to do it in v1.2 setting the flag the "embedded content contains swift code" in the framework "build options" and setting the DYLD_FRAMEWORK_PATH to define the place of the framework before executing the command. You can see it in the https://github.com/jmgc/GMPSwift project under GitHub. Best

Did you only test it on the playground, or have you tested it in another command-line app target? The error happens when you import a swift library to a command line app.

Command Line Tool - Can't link to custom Swift Framework
 
 
Q