Overview
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 install
cd ios
- ``
pod install
and then an error is thrown
Applies To
- React Native v4.5.0
- react-native-sample app (
00-Login
folder) (Fixed in this commit)
Cause
Using out-of-date source repos/pods
- react-native-sample app (
00-Login
folder) was referencing older versions of those dependencies - React Native v4.5.0
A0Auth0.podspec
file updated the Auth0, JWTDecode, and SimpleKeychain dependencies - React Native v4.5.0
Podfile.lock
file was updated to use the A0Auth0 4.4.0, Auth0 2.10, JWTDecode 3.2.0, and SimpleKeychain 1.2.0 pods
Solution
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
``
``