penn-mobile-ios
penn-mobile-ios copied to clipboard
Replace Cocoapods with Swift Package Manager
Now that Xcode 11 officially supports Swift Package Manager, we should replace our Cocoapods with SPM packages (as much as we can).
SPM is superior for a few reasons:
- Officially supported by apple and integrated into Xcode
- Written in Swift
- Better handling of framework dependencies (see: why Cocoapods is bad). This would mean everything could happen inside a .xcodeproj, no need for the .xcworkspace
Why Cocoapods is bad:
- Requires a 3rd party tool installed by Homebrew. This introduces potential for different developers to have different versions of this tool, resulting in lots of pain this semester with our .xcworkspace files being broken.
- Written in ruby, not swift. Ew.
- CP essentially creates an Xcode proj file for each pod, then links them together under an XCworkspace.
- Less emphasis on controlling the versions of your pod. SPM makes it trivial to support "up to the next major version"
Why Cocoapods is good:
- By far the most popular. Every pod is a cocoapod.
Why we should make this transition:
- They are not mutually exclusive! We can begin this transition without removing Cocoapods.
- This gives us a chance to clean up, remove, or update old pods.
- We can begin replacing Cocoapods with SPM packages very easily. We could slowly decrease the number of Cocoapod packages over time, while maintaining our installation for the pods that aren't yet on SPM (for example: Firebase).
- MANY of our pods are already on SPM.
- The community is super jazzed about SPM, and there's open pull requests on basically every pod we have adding SPM support (its really easy to add support to an existing Cocoapod library).
A note about Firebase: Google is enthusiastic about adding SPM support, but isn't able to yet due to a missing feature. Said feature has already been approved by the Swift team and will be in a future version.
Written in ruby, not swift. Ew.
Who does this guy think he is