skip to Main Content

I’m using Swift Playgrounds App on Mac, which is different than Swift Playgrounds inside the Xcode.

I’m interested in using a UIKit-based Swift Package in my Playground, but couldn’t find anything similar to Package.swift file or a menu item to add a package:

Is there an option to connect an external Swift Package stored in a git repository or are only local modules allowed?

Playground

2

Answers


  1. What I would try do is open the playground file in the finder.
    You can open the playground book as a folder and see the contents of the playgrounds there and paste the swift package there.

    Login or Signup to reply.
  2. I add the GitHub hosted packages by tapping the add file button and selecting package from the menu and pasting the GitHub link into the pop up. It will ask you to select the version you want to use.

    I’m guessing in the Mac interface that will be in the File menu.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search