CocoaPods Could Not Find Compatible Versions for Pod “Auth0”
This article explains the cause of the following error when trying to build the React Native Sample App (00-Login folder), which prevents the app from being completed and started up.
- Error:
[!] CocoaPods could not find compatible versions for pod “Auth0”:
In snapshot (Podfile.lock):
Auth0 (= 2.4.0) - In Podfile:
A0Auth0 (from../node_modules/react-native-auth0) was resolved to 3.0.0, which depends on
Auth0 (= 2.5.0)
The error happens after following these steps:
yarn installcd iospod installand then an error is thrown
- React Native v4.5.0
- react-native-sample app (
00-Loginfolder) (Fixed in this commit)
Using out-of-date source repos/pods
- react-native-sample app (
00-Loginfolder) was referencing older versions of those dependencies - React Native v4.5.0
A0Auth0.podspecfile updated the Auth0, JWTDecode, and SimpleKeychain dependencies - React Native v4.5.0
Podfile.lockfile was updated to use the A0Auth0 4.4.0, Auth0 2.10, JWTDecode 3.2.0, and SimpleKeychain 1.2.0 pods
Use the latest auth0-react-native sample app to resolve the dependency issue. It was recently fixed through this commit.
Another option is to update the pod dependencies to the latest versions.
While in the iOS folder, update the out-of-date source repos with the following commands:
pod repo update
pod update Auth0
or with
pod install --repo-update