Pedro Piñera

Home 🏚
Journal 📝
About 👨‍💻
Speaking 🎤
Photos 📸
Open Source 🐙
Lens 🔍
Wiki 📝
Books 📚

Moving Pods to Packages

24 December 2019

Today, I decided to move all Angle's dependencies that were defined as CocoaPods Pods to Swift Packages. It was my first-hand experience with Xcode's integration with the Swift Package Manager so here are my thoughts:

  • I had no issues. I went through all the dependencies, got their URL, and added the dependency from the linking frameworks build phase. Xcode was able to resolve the dependencies, list the linkable targets, and configure the project seamlessly. I barely had to touch anything on the project.
  • Some Pods had not Package.swift file so I ended up using Carthage for those. I compiled a .framework file and then dragged and drop the framework to the project.
  • After moving all the dependencies, I deleted the workspace generated by CocoaPods and all the references from the project. The project built successfully, and ran without any issues.

Apple did a really good job here.

By the way, I'm very excited to continue working on Angle, another side project in which I'm involved and to which I couldn't contribute much because I was mainly focused on Tuist. Last weekend I worked on creating the documentation website in Gatsby. It already contains the getting started steps in case you want to give it a try.

Image that shows how dependencies are defined as packages in Angle