CocoaPods Dependency Conflict with StripePaymentSheet in React Native Project
Description
Problem Description
I am encountering a dependency conflict with the StripePaymentSheet pod while running pod install --repo-update in my React Native project. The issue arises because:
- My
Podfile.lockspecifiesStripePaymentSheet (= 23.28.1, ~> 23.28.0). - The
stripe-react-nativepackage (version0.41.0) requiresStripePaymentSheet (~> 24.2.0). - The
stripe-identity-react-nativepackage causes conflicts.
This version mismatch prevents CocoaPods from resolving dependencies.
Error Message
[!] CocoaPods could not find compatible versions for pod "StripePaymentSheet": In snapshot (Podfile.lock): StripePaymentSheet (= 23.28.1, ~> 23.28.0) In Podfile: stripe-react-native (from ../node_modules/@stripe/stripe-react-native) was resolved to 0.41.0, which depends on StripePaymentSheet (~> 24.2.0)
Steps to Reproduce
- Install the latest versions of
@stripe/stripe-react-nativeand@stripe/stripe-identity-react-native: - run pod install in the ios folder
Expected Behavior
CocoaPods should successfully resolve all dependencies and install the required pods without conflicts.
Actual Behavior
CocoaPods fails to resolve the dependency conflict between StripePaymentSheet versions 23.28.1 and 24.2.0
Steps Already Taken
- Updated CocoaPods repositories
- Cleaned and reinstalled pods
- Attempted to force update StripePaymentSheet
- Downgraded stripe-react-native to a version compatible with StripePaymentSheet 23.28.1
- Used --legacy-peer-deps during npm installation
Removing stripe-identity-react-native solves the problem. However this package is needed for indentity verification. This issue only began 3 weeks ago. Prior to this "@stripe/stripe-identity-react-native": "^0.2.11" was used with stripe 0.38 and it worked fine. now however nothing works.