-
Notifications
You must be signed in to change notification settings - Fork 271
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pod install ... CocoaPods could not find compatible versions for pod "Stripe": #1116
Comments
same issue |
Hi @russmenum, maybe you can delete ios/Podfile.lock before |
Tried @nicolasdevienne , but deleting
Is there a way to manually add this co-dependency the libray seems to fail too? |
Hi @russmenum, try delete ios/Podfile.lock file and Pods/ directory and execute |
Ok that did let I know the error said that, but this is running commands I am not fully familiar with just to clear an error... Google implies it is just a list of repos? But pods are finicky |
@russmenum are you sure that you were able to reproduce this error with a blank project & the steps listed above? AKA:
Usually this error happens when you have an earlier version of the Stripe pod already installed, and then add (or update) a JS dependency that then uses a newer version, and you need to update the Pods to pull in the newer version. But if you were able to trigger this error after installing in just the basic react native init app, then maybe there's something else going on (although I'm not sure what). FWIW I was not able to reproduce with those steps on my machine. |
@charliecruzan-stripe looks like the issue only happens when running |
@charliecruzan-stripe yes, I made a fresh project, and have copied no JSON or node over. Am copping files like app.js and then resolving dependencies and undefined one at a time, but those are the RN app JS nothing to do with PODS or libraries. The old app JS was using
FYI, I am doing this rebuild on an iMac 3 GHz 6-Core Intel Core i5; but I did do the repo start and |
That's the reason. NPM modules can declare dependencies on pods, so when you resolved that dependency, it added an older version of As stated earlier, this is a common error message when attempting to update an older pod, and following the messages suggestions should resolve it :) |
Respectfully I did not resolve that dependency. I never installed As stated that is ANOTHER PROJECT, not this one. The only missing step is the error
@charliecruzan-stripe are you claiming what happens on another project and repo affects building an app using Again never installed |
@russmenum I think it would be very helpful for you to initialize a git repository with this react native sample project you created so that I can clone it and dig in more. No, that shouldn't creep into fresh projects but it's not totally clear to me what exactly was brought over from your old project, and what wasn't |
@charliecruzan-stripe Same here. I want to update
After running
I get:
Any suggestions how to solve this? |
@charliecruzan-stripe at the point I encountered my error the only thing I brought over was
or import React, {useContext} from "react";
import {Platform} from "react-native";
//import stripe from "tipsi-stripe"; //no longer maintained, replace with @stripe/stripe-react-native
import { initStripe } from '@stripe/stripe-react-native';
import { PersistGate } from "redux-persist/integration/react";
import { Provider } from "react-redux";
import { store, persistor } from "./redux/store";
import MAINAPP from "./MAINAPP";
import { Text, TextInput, ActivityIndicator, AsyncStorage } from "react-native";
import { colors } from "./constants/restaurantColors";
import { ModalProvider } from "./contextAPIs/ModalContext";
import { RestaurantProvider } from "./contextAPIs/RestaurantContext";
import { UserProvider } from "./contextAPIs/UserContext";
import {devicePushTokenAsync, requestNotificationPermission} from "./util/notifications";
import Constants from 'expo-constants';
import * as Notifications from 'expo-notifications';
import { useState, useEffect, useRef } from 'react';
import { View, Button } from 'react-native';
Notifications.setNotificationHandler({
handleNotification: async () => ({
shouldShowAlert: true,
shouldPlaySound: true,
shouldSetBadge: true,
}),
});
const TESTMODE = false;
if (__DEV__) {
import('./ReactotronConfig').then(() => console.log('Reactotron Configured'))
}
// stripe.setOptions({
// publishableKey: "SANITIZED",
// merchantId: "SANITIZED",
// androidPayMode: TESTMODE ? 'test' : 'production',
// });
useEffect(() => { //SEE: https://github.com/stripe/stripe-react-native
const publishableKey = "SANITIZED"
initStripe({
publishableKey: publishableKey,
merchantIdentifier: "SANITIZED",
//urlScheme="your-url-scheme",
});
}, []);
function App() {
const [expoPushToken, setExpoPushToken] = useState('');
const [notification, setNotification] = useState(false);
const notificationListener = useRef();
const responseListener = useRef();
useEffect(() => {
requestNotificationPermission()
}, []);
Text.defaultProps = Text.defaultProps || {};
Text.defaultProps.allowFontScaling = false;
TextInput.defaultProps = TextInput.defaultProps || {};
TextInput.defaultProps.allowFontScaling = false;
return (
<>
<ModalProvider>
<RestaurantProvider>
<UserProvider>
<Provider store={store}>
<PersistGate
loading={<ActivityIndicator color={colors.primaryDark} />}
persistor={persistor}
>
{TESTMODE
? (<Text style={Platform.OS === 'ios' ? [styles.AndroidTestMode, styles.iOSTestMode] : [styles.AndroidTestMode]}>TEST MODE</Text>)
: null
}
<MAINAPP />
</PersistGate>
</Provider>
</UserProvider>
</RestaurantProvider>
</ModalProvider>
</>
);
}
export default App;
const styles = {
AndroidTestMode: {
backgroundColor:"yellow",
color:"red",
},
iOSTestMode: {
paddingTop: 45,
},
}
All I did was copy the old JS over to start resolving/updating to current libraries. This is a clean restart to get up to date. For obvious reasons sanitized the keys, but otherwise this is the code added beyond the command line steps originally posted. As you can tell from the code have since copied more over and added |
Please provide a link to a repo that I can clone to reproduce the error, the JS code wouldn't cause the pod issue |
Hi @russmenum, have you the minimum requirement of iOS = 12.0 in your Podfile and your Xcode project ? |
I have similar type of issue. I follow these 2 step to resolve my issue. First Issue
Specs satisfying the 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
Found solution on this stack answer |
Hi @Mahdi-Farahani! Maybe you can try this? |
@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 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. |
i tested and changed package versions - platform :ios - development target - BUT STILL I HAVE ISSUE : CocoaPods could not find compatible versions for pod "stripe-react-native": OS:MAC M1 |
I was facing the same issue when I cloned a old project and tried to tun that in my react native. |
@Mahdi-Farahani Put of iOS platform version in Podfile to 13.0 and test it, my bro. |
+1 |
1 similar comment
+1 |
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
For those trying to upgrade to 0.71 and experiencing this issue, |
ok would not maybe do somthing like |
Go to Just for in case is needed do: This is on Mac Air M1 chip. Hope this helps |
guys simply upgrade your pods target to 33 |
The question is why are they targeting 13 instead of 12.4 when the platform itself (RN) doesn't? Who is the consumer of this if not React Native projects, which even on the latest release candidate, target 12.4? |
To use the newest versions of the |
I'm using 0.19.0 and have the same issue. I am unable to change the podfile as I am using Expo. What will be the direction to go about fixing/debugging this? |
If you're using Expo, you need to install the library with |
Just go into your pod file min_ios_support platform :ios, '13.0' change in pod file, |
changing the line platform :ios, min_ios_version_supported in Podfile with platform :ios, 13 solved it for me. |
This worked for me as well, |
i am just doing |
If your platform :ios, min_ios_version_supported You can modify it like so to avoid breaking your application when react-native itself won't support iOS 13. MIN_IOS_OVERRIDE = '13.0'
if Gem::Version.new(MIN_IOS_OVERRIDE) > Gem::Version.new(min_ios_version_supported)
min_ios_version_supported = MIN_IOS_OVERRIDE
end
platform :ios, min_ios_version_supported |
@elibroftw In the Podfile? That gave me an invalid Podfile error. I like this idea though! |
@rob5408 Yes, like so: Note that |
if you get rid this error |
I tried several things but the one which worked for me was
|
run pod update |
Describe the bug
A clear and concise description of what the bug is.
I am trying to add
@stripe/stripe-react-native
to a projectnpm install @stripe/stripe-react-native
seems to run, but when I try and dopod install
I getTo Reproduce
Steps to reproduce the behavior:
npx create-react-native-app
npm install @stripe/stripe-react-native
cd ios
, and try and runpod install
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):
Smartphone (please complete the following information):
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 READMEThe text was updated successfully, but these errors were encountered: