stripe-react-native: pod install is giving a minimum deployment target error when my app is set up correctly with iOS 13 as the min deployment target
Describe the bug
When running pod install on my iOS project, after installing the stripe react native package with yarn, I am getting an error “Specs satisfying the stripe-react-native (from
…/node_modules/@stripe/stripe-react-native)
dependency were found, but they required a higher minimum deployment target.” but my minimum deployment target is iOS 13 as specified in the documentation.
To Reproduce Steps to reproduce the behavior:
- Create a new React Native project (I’m using the latest v0.71.1 of react native) without expo.
- Run yarn install @stripe/stripe-react-native
- Run cd ios && pod install
- This is where I receive the error.
Expected behavior The package should be installed without issues.
Desktop (please complete the following information):
- OS: [e.g. iOS] iOS build running on Mac Mini M1 2020. Tried this with XCode 14 and also upgraded to 14.2 but with the same result.
Smartphone (please complete the following information):
- Device: [e.g. iPhone6] iPhone 11 Pro Max
- OS: [e.g. iOS8.1] iOS 16.2
Additional context I’m migrating all my code from a RN 0.68.5 project into a new 0.71.1 project. I’ve started off by setting up the build schemes and installing dependencies in the application. There is quite a list of dependencies and all of them have gone fine except for this one. I tried installing the same version as the one that I had installed in my previous RN application, which was @stripe/stripe-react-native@0.21.0, but that actually gave me the same error as the latest version. I then tried increasing my deployment target on the iOS app to iOS 14 and 15 and 16 and each of them failed with the same error.
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 16
@hussainarthuna The variable is defined here:
node_modules/react-native/scripts/react_native_pods.rb
Lines 29 to 31 for me:
Unfortunately I don’t know much ruby if it’s possible to override a variable definition in our own Podfile.
Solution that doesn’t require modifying your node_modules.
Add the following (before
# existing code
) to yourPodfile
TODO: Pull the highest
IPHONEOS_DEPLOYMENT_TARGET
from your project.pbxproj instead ofMIN_IOS_OVERRIDE
In case anyone would like the code to read from the IPHONEOS_DEPLOYMENT_TARGET from the proj file
HI @MDG-MMeksasi,
It was included at the top of my podfile as follows:
But there was no definition for the variable. I replaced the variable with 13.0 as follows and it worked:
That’s actually strange, thanks for pointing that out. I didn’t create that variable - must be something new in RN. I changed it to 13.0 and it’s installed now!
Thank you for your help 😃
For the record, I thought that by adjusting the deployment version in XCode that it would update the podfile, and that the variable referenced was being updated accordingly. Seems that that isn’t the case though!
thanks! and where do you define
min_ios_version_supported
?