stripe-ios
stripe-ios copied to clipboard
[Feature] SPM Improvement
Is your feature request related to a problem? Please describe.
- When bringing in the SDK via Swift Package Manager, in the current setup when downloading the Stripe package, it also needs to compile the code. This increases compile time, which for us is important as we pay for build minutes for our CI (via Git Actions).
Describe the solution you'd like
- Provide a swift package that references binary targets of xcframeworks
- Here's an example of another SDK we use which does this
Describe alternatives you've considered
- We currently cannot leverage SPM and import the SDK using the xcframework, which just increases the effort to keep the SDK updated. Going this route also muddies up our commit history, we've seen some updates contain over 1m changes (most of which are JSON files we found).
Thanks!
Hi @ryang1428, thanks for filing this! We'll consider adding a binary SPM distribution — Xcode's support for binary Swift frameworks was unreliable in the past, but it has improved in recent versions. For now, here are a few other ideas:
- Can you try pointing your SPM package URL to https://github.com/stripe/stripe-ios-spm? This is a lightweight repo intended for SPM users, with most of the unnecessary files and history removed. You'll still have to compile the dependency, but it should be relatively quick. (~30 seconds to clone and build)
- Alternatively, some of our users use Tuist to cache their SPM dependencies: https://docs.tuist.io/guides/third-party-dependencies
@davidme-stripe Thanks for the quick response-- and that would be great! We did see the stripe-ios-spm repo, but 30 seconds (even 10s) adds to to be a lot of CI minutes for us for the amount of builds we run. We'll continue to bring in the xcframework directly