The Swift Package Index Blog

Launching the Swift Package Index Playgrounds app for macOS

Posted Wednesday, May 5, 2021.

From the very beginning, the main goal of this site was to do more than echo Swift package metadata. We want to enable better decisions about which dependencies to use. That’s why we include information about how actively maintained a package is, and it’s why we check compatibility with the different platforms by building against them.

Once you’ve decided that a package might be a good fit for your project, what’s your next step? Do you import it and start coding against it?

There’s a better way.

What if you could click a button and open Xcode with a Swift playground that has the library you’re thinking of using already imported? That’s what we’re launching today with the Swift Package Index Playgrounds app.

Once you have installed the app, click “Try in a Playground” from any package page.

The Swift Package Index site with the Try in a Playground button highlighted

Then click "Create Playground" when the app launches.

The Swift Package Index Playgrounds app running on macOS

Choose where to save it, and a few seconds later, the playground will open in Xcode, ready for experimentation and testing! We’d love to know if this is a helpful feature, so be sure to let us know on Twitter.

There’s also an amusing story behind this feature, which prompted us to write up the story behind “The Button”.

The Swift Package Index is a search engine for Swift packages with one goal. To help you make better decisions about dependencies. For more information, the best place to start is with the Frequently Asked Questions.