stripe-react-native: pod install ... CocoaPods could not find compatible versions for pod "Stripe":
Describe the bug
A clear and concise description of what the bug is.
I am trying to add @stripe/stripe-react-native
to a project npm install @stripe/stripe-react-native
seems to run, but when I try and do pod install
I get
[!] CocoaPods could not find compatible versions for pod "Stripe":
In Podfile:
stripe-react-native (from `../node_modules/@stripe/stripe-react-native`) was resolved to 0.18.1, which depends on
Stripe (~> 22.7.0)
None of your spec sources contain a spec satisfying the dependency: `Stripe (~> 22.7.0)`.
You have either:
* out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
* mistyped the name or version.
* not added the source repo that hosts the Podspec to your Podfile.
To Reproduce Steps to reproduce the behavior:
- Make a fresh app, I used
npx create-react-native-app
npm install @stripe/stripe-react-native
cd ios
, and try and runpod install
- See error
Expected behavior I would expect the pod install to complete and resolve the pods
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- POD ERROR IS NOT APPLICABLE
Smartphone (please complete the following information):
- POD ERROR IS NOT APPLICABLE
Additional context Add any other context about the problem here.
While walking over an old project, at this point for all intents this is a new app as of this week, REDUX is the only other thing I have installed so far. The error is clearly wanting Stripe (~> 22.7.0)
but I am not seeing any manual iOS links referenced in the README
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 44
@Mahdi-Farahani Put of iOS platform version in Podfile to 13.0 and test it, my bro.
Go to
ios
folder within your project, openPodfile
and changeplatform :ios, '12.4'
toplatform :ios, '13.0'
this fixed the issue for me.Just for in case is needed do:
remove podfile.lock
and also dopod install --repo-update
This is on Mac Air M1 chip.
Hope this helps
Warning that more people will slowly start having this issue, since RN 0.71 takes control of the minimum target version (by default, based on the default template and what upgrade-helper will suggest).
https://github.com/facebook/react-native/blob/0.71-stable/template/ios/Podfile#L4
platform :ios, min_ios_version_supported
min_ios_version_supported resolves to 12.4 for RN 0.71.For those trying to upgrade to 0.71 and experiencing this issue, change the line
platform :ios, min_ios_version_supported
in your Podfile withplatform :ios, 13
.Hi @russmenum, have you the minimum requirement of iOS = 12.0 in your Podfile and your Xcode project ?
Hi @russmenum, try delete ios/Podfile.lock file and Pods/ directory and execute
pod install --repo-update
changing the line platform :ios, min_ios_version_supported in Podfile with platform :ios, 13 solved it for me.
If your
Podfile
has the following:You can modify it like so to avoid breaking your application when react-native itself won’t support iOS 13.
@Mahdi-Farahani I have not tried to run this rebuild on the M1 yet, still trying to get to a runnable point on Intel Mac, but maybe try
arch -x86_64 pod install --repo-update
?It is stupid how many things you still need to run in x86 mode for it to work on an M1 but it is what it is.
@charliecruzan-stripe Same here. I want to update
@stripe/stripe-react-native@^0.4.0
to latest. When runningpod install
I got this error:After running
yarn upgrade stripe --latest
,yarn upgrade @stripe/stripe-react-native --latest
and runningpod install
andI get:
Any suggestions how to solve this?
Hi @russmenum, maybe you can delete ios/Podfile.lock before
pod install
?Tried @nicolasdevienne , but deleting
ios/Podfile.lock
still resulted in the errorIs there a way to manually add this co-dependency the libray seems to fail too?
I tried several things but the one which worked for me was
git config http.postBuffer 1024M
Just go into your pod file min_ios_support platform :ios, ‘13.0’ change in pod file, if you are using intel chip just do “pod install”, and you good to go, if you have apple chip then, do this “arch -x86_64 pod install”
guys simply upgrade your pods target to 33 but if but want pod target less than 33 use @stripe/stripe-react-native@0.19.0 that work for me
That’s the reason. NPM modules can declare dependencies on pods, so when you resolved that dependency, it added an older version of
stripe-ios
to your project. In the future, make sure to include all steps in the “steps to reproduce the error” sectionAs stated earlier, this is a common error message when attempting to update an older pod, and following the messages suggestions should resolve it 😃