swiftswift-playgroundswift-package-manager

How to import Swift Package in Playground?


Can i import Swift Package to my Playground that is in my workspace? I've already read the answer, but i think it's outdated, because now we can use Swift Packages in iOS projects.


Solution

  • In Xcode 12, you can use Swift Packages with Xcode Playgrounds.

    You can find additional details and a sample project in this WWDC20 session: Explore Packages and Projects with Xcode Playgrounds

    Ensure to check the new "Build active scheme" checkbox in the inspector for your existing Playgrounds.