About

About the SwiftPM Library

The Swift Package Manager (SwiftPM) is a fantastic tool from Apple for building and integrating libraries of code into your Swift app. In September, with the release of Xcode 11, the Swift Package Manager will be fully integrated into Xcode with good support for the iOS, macOS, watchOS, and tvOS platforms.

Once you have chosen a package, Xcode 11 makes it easy to integrate it into your project. But with so many third party libraries available for Swift, how do you pick the right one? You need to consider which ones are well supported, whether they are compatible with your version of Swift, what platforms they support? It’s hard. That’s the question this site aims to answer.

How does it work?

The library reads a list of repository URLs from this JSON file in this repository. This server pulls the full source code, and git history of every package and extracts metadata about it. The server runs the swift package command on the checked out code, parses the git history, and also inspects any Xcode project files in the library. Each package is polled for changes approximately every two hours, and metadata is re-parsed whenever new changes are found.

What about the GitHub Package Registry?

No, I wasn’t sleeping during the announcement of the GitHub Package Registry! I think the partnership between GitHub and Apple is wonderful and I hope that GitHub can build a comprehensive list of every available package.

I really hope the GitHub Package Registry will provide a public and open list of all packages when it is released. If it does, the master list of packages that this site uses will switch to that. However, even in that case I hope this site will provide a richer set of Swift specific metadata about packages than the GitHub registry does.

I believe this site will still have value, even when the package registry is complete.

Who built this?

Thanks for asking! I’m Dave Verwer! I write a weekly iOS development newsletter, iOS Dev Weekly. I also run iOS Dev Jobs and the iOS Dev Directory.

I have an idea to make the SwiftPM Library better!

I’d love to hear all ideas on how I can improve this site further. Please discuss and suggest future features with GitHub Issues.

Thanks for reading!

Back to top