[swift-users] How to build a CLI tool which links a Swift framework? (OSX)

Quinn "The Eskimo!" eskimo1 at apple.com
Thu Aug 25 11:59:58 CDT 2016


On 25 Aug 2016, at 11:28, Karl via swift-users <swift-users at swift.org> wrote:

> I’m having a problem getting the framework and CLI tool to work together, because of the Swift standard libraries …

Yep, I know this problem well.

What I do is use Xcode to create an app target, remove all the app-specific stuff from that, add then a `main.swift`, and add my command line code to that.  If I need to provide easy access to the ‘tool’ from Terminal, a quick alias or symlink will do the trick.

Share and Enjoy 
--
Quinn "The Eskimo!"                    <http://www.apple.com/developer/>
Apple Developer Relations, Developer Technical Support, Core OS/Hardware




More information about the swift-users mailing list