stripe / stripe-ios

Stripe iOS SDK
https://stripe.com
MIT License
2.12k stars 980 forks source link

[BUG] Cannot integrate stripe-iOS using SPM using Xcode 15.3 #3536

Closed OJDee closed 2 months ago

OJDee commented 6 months ago

Summary

When attempting to archive app, at the point of checking out dependencies via SPM, the following error is produced and archive fails

xcodebuild: error: Could not resolve package dependencies:
  Dependencies could not be resolved because no versions of 'stripe-ios' match the requirement 23.27.1..<24.0.0 and root depends on 'stripe-ios' 23.27.1..<24.0.0.

Using Xcode-select 15.1, with exact same project and settings, the app is archived correctly

Code to reproduce

Add stripe-iOS using SPM, with following properties: Up to next major version 23.27.1 < 24.0.0

Xcode version

Xcode 15.3

Installation method

Swift Package Manager

davidme-stripe commented 6 months ago

Hello, thanks for filing! Not sure about this, but I'm seeing a similar issue with other SPM packages. Could you try setting a version number as shown there and see if it resolves the issue?

As another tip, try using https://github.com/stripe/stripe-ios-spm as your SPM URL: It should make your checkout process significantly faster.

porter-stripe commented 2 months ago

@OJDee if you are still experiencing this issue please re-open this issue with some more info! Thanks!

AhmedAminFarid commented 3 weeks ago

@OJDee @porter-stripe I have the same issue on Xcode 16, any advice?

OJDee commented 3 weeks ago

I changed to using the stripe-ios-spm repo which appears to work as expected.