BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News The Swift Package Index Now Backed by Apple

The Swift Package Index Now Backed by Apple

Bookmarks

The Swift Package Index was created about three years ago by Dave Verwer and Sven A. Schmidt with the aim of making it easier for Swift developers to search and discover Swift packages. The project is now officially sponsored by Apple, thus making it the official place to go for anything related to Swift packages

The Swift Package Index, as its name implies, is not a full-fledged repository of packages. Instead it focuses on indexing package metadata to provide developers with detailed information to help them drive their decisions about which packages to include in their projects.

It answers questions like how long a package has been in development, how the author has licensed the code, whether pull requests and issues are being monitored and responded to, and more. At first glance, a package page on the index can look similar to its GitHub repository page, but we focus the metadata to be relevant to potential user of the package.

The Index includes currently over 5,000 packages, practically all of them hosted on GitHub. Each package is cloned and built for a number of different Swift versions and platforms to assess its compatibility and metadata is collected to identify essential information.

The “build system”, as we now call it, processes an average of 5,000 builds per day and has completed more than five million builds in total. It’s such a large operation that it needs its own custom monitoring app.

The results of the build step are summarized for each package in a compatibility matrix.

The Index has started more recently to provide the community a platform to host documentation for their packages, which is often critical to decide whether to use a dependency.

Any package author can now opt-in to documentation generation, and once the build system has completed a successful build, we’ll host versioned DocC documentation.

After Apple introduced the Swift Package Manager as the official tool for Swift code distribution, a new arena opened up for services like the now defunct "IBM Swift Package Catalog", which was launched in a timely fashion by IBM but failed to catch sufficient traction with developers. The IBM Swift Package Catalog was first replaced by the Vapor Community Package Catalog API and then by the Swift Package Registry, not to be confused with the Swift Package Index which has just been endorsed by Apple.

Among the advantages of the Swift Package Manager versus alternative package repositories like CocoaPods and Carthage is its integration with the Swift build system and tight integration within Xcode, which makes its use almost transparent to developers. On the other hand, both CocoaPods and Carthage support Objective-C packages in addition to Swift ones.

About the Author

Rate this Article

Adoption
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

BT