Sponsoring CocoaPods

Illustration: Sponsoring CocoaPods

CocoaPods is a dependency manager for Apple’s platform, and it powers 75 percent of all apps made. Before, the CDN costs to keep the repo running were paid by an individual, but PSPDFKit is now taking care of the costs.

We wanted to wait to make sure everything works before making the announcement. But now that the first bill came through on June 7, we’re happy to share the news!

What’s CocoaPods?

CocoaPods is the most popular dependency manager in Apple’s ecosystem, and it’s been around since 2011. Three out of four companies use it every day to build apps. And while Apple open sourced the Swift Package Manager in 2015, the transition is a slow one, and CocoaPods will remain important for many years to come.

The CocoaPods CDN

CocoaPods used git as a database previously, and it’s hosted for free on GitHub. In 2016, the problems began: The repository grew so large and was accessed so often that GitHub started to rate-limit all operations. This is because the repo kept five whole server CPUs permanently busy.

After some earlier experiments, the core team eventually settled on using Netlify for the Specs CDN. The specs are committed into the Specs repo using the GitHub API, and Netlify runs on almost every commit.

Hidden Costs

In reality, because of the frequency of pod publishes, some of the commits get skipped, and the result is that the builds on Netlify run continuously, back-to-back, throughout most of the work day.

Netlify offers a free OSS plan, which is generous, but that doesn’t cover the project completely. CocoaPods goes a bit over the allowed bandwidth quota, which Netlify covers. However, there’s also a limit of 1,000 build minutes per month, which is usually exceeded in one or two days.

The cost of going over is a few hundred dollars per month. To date, Dimitris Koutsogiorgas has been generously paying this amount out of pocket. CocoaPods isn’t a registered non-profit entity, so companies like Google were unable to help. As a result, we stepped in — being a smaller entity has its benefits.

In late 2019, we sponsored CocoaPods development to help with the xcframework integration of the 1.9 release. Supporting multiple architectures via frameworks is now more important than ever with Apple’s move to an ARM-based design.

We wanted to continue helping the ecosystem, as we see dependency management as an important part of the community. While talking with Igor Makarov, I learned about the current situation with the CDN. I had no idea that this was not something sponsored by a company, since CocoaPods is such an integral component of building apps, and I was outraged that this was paid privately by someone from the core team who already donates his time to the project.

We implemented the billing change a few days later. This was an easy process, as there was already mutual trust, due to having sponsored CocoaPods a few months earlier to help with the aforementioned xcframework integration. We also looked at our current support for CocoaPods and asked what we could make better. As a result, we made our Podspec public, whereas previously it was only available after a trial signup with a custom URL.

Our Guarantee

I personally guarantee that we will cover the costs for the next two years, and we are planning to cover this indefinitely, as long as PSPDFKit exists.

We support and benefit from the simple integration that CocoaPods enables, and we are proud to have the possibility to give back to this amazing community.

A special thanks to all the companies helping and sponsoring CocoaPods development.

PSPDFKit Newsletter

Subscribe to our newsletter for more articles like this.