braintree / braintree_ios

Braintree SDK for iOS
https://developer.paypal.com/braintree/docs/start/hello-client/ios/v5
MIT License
556 stars 290 forks source link

Braintree iOS SDK takes a long amount of time to resolve via SPM #1351

Open waitbutY opened 2 days ago

waitbutY commented 2 days ago

Is your feature request related to a problem? Please describe.

In our app, we have 40-50 SPM dependencies, and Braintree is in the top 3 slowest packages to resolve.

Describe the solution you'd like.

This is a known SPM issue, as SPM by default pulls not just the code but all the branches and commit history, etc. https://github.com/swiftlang/swift-package-manager/issues/6062

Some larger repositories have solved this by creating a separate repo that just points to the precompiled XCFramework, resulting in much, much smaller and faster package resolution.

Example, Lottie: https://github.com/airbnb/lottie-spm

Can Braintree SDK be offered in this way for iOS app consumption?

scannillo commented 2 days ago

Hello @waitbutY - thank you for bringing this to our attention. I do see that SPM does a git clone --mirror (snippet) which copies all ref, remotes, & branches.

This is something we would love to improve. My first idea of why our SDK is so massive is the way we store our 3rd party dependencies (in a local Frameworks dir). We will explore this route, as well as others, to see how we can get the SPM install time down.

Will update this ticket once we're able to prioritize this initiative. Any other concerns please don't hesitate to bring them to our attention - any feedback helps us greatly!