Nate Murray Nate Murray - 1 year ago 210
Swift Question

How to I import 3rd party frameworks into Xcode Playground?

How do I import 3rd part frameworks into Xcode Playground?

Swift Playground obviously has a framework import mechanism because we can import

, and in an OSX Playground,
seems missing from iOS, oddly)

What I'd really like to do is hide code from my playground and be able to show a minimal example. Any thoughts on how to load a Framework into Swift playground?

See also:

(This question is different because the request is to use a framework in Playground rather than simply regular

Answer Source

Edited: As of Beta5 this is now supported when the playground is part of the workspace that builds the framework as a target. There are more details on the Apple dev forums site, but hopefully @Rick Ballard will add them to his answer here and that should becoke the definitive answer for this question.

Don't do the below anymore!

For the short term, while there's no supported solution, if you're producing a Module/Framework you can copy it into the SDKs System/Library/Frameworks directory and then just import <#Module#> the same way as you import system Frameworks.

For an OS X Playground: /Applications/

And for iOS: /Applications/

But before you do that... go file a radar as @Rick says in his answer.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download