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-nativecd 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 4 years ago
- Comments: 44
@Mahdi-Farahani Put of iOS platform version in Podfile to 13.0 and test it, my bro.
Go to
iosfolder within your project, openPodfileand changeplatform :ios, '12.4'toplatform :ios, '13.0'this fixed the issue for me.Just for in case is needed do:
remove podfile.lockand also dopod install --repo-updateThis 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_supportedmin_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_supportedin 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-updatechanging the line platform :ios, min_ios_version_supported in Podfile with platform :ios, 13 solved it for me.
Hi @russmenum, maybe you can delete ios/Podfile.lock before
pod install?If your
Podfilehas 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.0to latest. When runningpod installI got this error:After running
yarn upgrade stripe --latest,yarn upgrade @stripe/stripe-react-native --latestand runningpod installandI get:
Any suggestions how to solve this?
I tried several things but the one which worked for me was
git config http.postBuffer 1024MTried @nicolasdevienne , but deleting
ios/Podfile.lockstill resulted in the errorIs there a way to manually add this co-dependency the libray seems to fail too?
run pod update
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”
To use the newest versions of the
stripe-ioslibrary, you need to target 13.0. But, if you’d like to continue targeting 12.4, then you can use@stripe/stripe-react-native@0.19.0guys 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
I have similar type of issue. I follow these 2 step to resolve my issue.
First Issue
[!] CocoaPods could not find compatible versions for pod "stripe-react-native": In Podfile: stripe-react-native (from…/node_modules/@stripe/stripe-react-native`)Specs satisfying the
stripe-react-native (from…/node_modules/@stripe/stripe-react-native)dependency were found, but they required a higher minimum deployment target.`Solution 1:- Change the ios version the in pod file from 11 to 12
Second Issue (I faced this issue because of the Mac M1 chip)
Solution 2:- Use the following command which help me to resolve this issue
sudo gem uninstall ffi && sudo gem install ffi -- --enable-libffi-allocFound solution on this stack answer
https://stackoverflow.com/a/73651994/9158543
That’s the reason. NPM modules can declare dependencies on pods, so when you resolved that dependency, it added an older version of
stripe-iosto 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 😃