Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace Cocoapods with Swift Package Manager #290

Open
DominicHolmes opened this issue Jan 6, 2020 · 1 comment
Open

Replace Cocoapods with Swift Package Manager #290

DominicHolmes opened this issue Jan 6, 2020 · 1 comment
Assignees
Labels
dependencies Pull requests that update a dependency file enhancement

Comments

@DominicHolmes
Copy link
Member

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.

@DominicHolmes DominicHolmes added enhancement dependencies Pull requests that update a dependency file labels Jan 6, 2020
@DominicHolmes DominicHolmes self-assigned this Jan 6, 2020
@DominicHolmes DominicHolmes changed the title Begin to replace Cocoapods with Swift Package Manager Replace Cocoapods with Swift Package Manager Mar 7, 2020
@DominicHolmes
Copy link
Member Author

Written in ruby, not swift. Ew.

Who does this guy think he is

@DominicHolmes DominicHolmes removed their assignment Apr 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file enhancement
Development

No branches or pull requests

2 participants