I’m working on a React Native project using version 0.75.4 and have encountered a problem while trying to set up CocoaPods. When I run pod install, I receive the following error message:
CocoaPods could not find compatible versions for pod “React-RuntimeHermes”:
I have attempted to resolve the issue by updating the minimum iOS version to 12.0 and reinstalling the pods, but unfortunately, the problem persists.
Could anyone provide guidance on how to resolve this compatibility issue? Are there specific versions of React Native and Hermes that are known to work well together?
I’m on 0.76 and I got the same error, but I succeeded by upgrading my min ios version to 15.1
1
I recently upgraded my React Native project from 0.75.4 to 0.76.0 (latest version at the time) using the React Native Upgrade Helper. Everything seemed fine until I tried to install the pods, and then I ran into an error.
The Upgrade Helper suggested setting IPHONEOS_DEPLOYMENT_TARGET
to 15.1, but for some reason, that didn’t work and led to the pod installation failing.
How I Fixed It
After some trial and error, I ended up fixing it by adjusting the deployment target in Xcode:
- Opened my project in Xcode.
- Went to Build Settings.
- Changed the Minimum Deployment Target from 15.1 to 15.6.
- Saved the changes and ran
pod install
again.
With the deployment target set to 15.6, the pods installed without any issues, and everything worked smoothly after that.
If using expo, changing expo-build-properties resolve the issue:
[
"expo-build-properties",
{
"android": {
...
},
"ios": {
"deploymentTarget": "15.1",
...
}
}
]
I upgraded expo and got the same issue.
I simply removed the ios folder and ran npx expo run:ios and the issue got resolved.
Any compatibility issue was probably resolved when expo had to rebuild the ios project files.
EDIT:
I didn’t check, but it would probably have also been resolved with npx expo prebuild --clean
which practically does the same thing (to android as well).
It’s a good practice to rebuild the ios/android env whenever you have the hunch that native libs may have changed beneath the surface (expo upgrade, new packages, etc.), or simply as a final resort for unexplained errors, just before restarting your dev machine.