I am using multiple firebase services on my react native project. Now I tried to add crashlytics
yarn add #react-native-firebase/crashlytics
But I get an error
[!] CocoaPods could not find compatible versions for pod "Firebase/CoreOnly":
In snapshot (Podfile.lock):
Firebase/CoreOnly (= 8.12.1)
In Podfile:
RNFBApp (from `../node_modules/#react-native-firebase/app`) was resolved to 16.4.3, which depends on
Firebase/CoreOnly (= 10.1.0)
You have either:
* out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
* changed the constraints of dependency `Firebase/CoreOnly` inside your development pod `RNFBApp`.
You should run `pod update Firebase/CoreOnly` to apply changes you've made.
This is how my package.json looks like
"#react-native-firebase/app": "^16.4.3",
"#react-native-firebase/auth": "^14.5.0",
"#react-native-firebase/crashlytics": "^16.4.3",
"#react-native-firebase/database": "^14.9.3",
"#react-native-firebase/dynamic-links": "^16.4.3",
"#react-native-firebase/firestore": "^14.5.1",
"#react-native-firebase/messaging": "^16.4.3",
"#react-native-firebase/storage": "^14.9.0",
I found multiple discussion with the same problem but nothing helped. I changed platform :ios, '12.1' to platform :ios, '13.0' in pod file. Pod update, and pod install commands also did't helped.
Please check if below method works
Delete the ios/Podfile.lock
Run pod install --repo-update command.
Related
I'm trying to run pod install in the ios folder and I get this error.
omsonone#Oms-MacBook-Pro ios % pod install
Ignoring ffi-1.15.4 because its extensions are not built. Try: gem pristine ffi --version 1.15.4
Detected React Native module pods for RNCMaskedView, RNReanimated, RNScreens, react-native-camera, react-native-safe-area-context, and react-native-save-view
Analyzing dependencies
[!] Unable to find a specification for `React-callinvoker` depended upon by `RNReanimated`
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.
I tried pod repo update but it doesn't help. I'm not sure what to do.
The react native version has been updated from 0.61.5 to 0.65.0.
After pod install I receive an error stating,
[!] CocoaPods could not find compatible versions for pod "FBReactNativeSpec":
In Podfile:
FBReactNativeSpec (from `../node_modules/react-native/React/FBReactNativeSpec`)
Specs satisfying the `FBReactNativeSpec (from `../node_modules/react-native/React/FBReactNativeSpec`)` dependency were found, but they required a higher minimum deployment target.
The path for FBReactNativeSpec in Podfile is,
pod 'FBReactNativeSpec', :path => "../node_modules/react-native/React/FBReactNativeSpec"
I cannot figure out how to resolve this.
try updating the platform version in your podfile.
platform :ios, '11.0' => change 11 to 15.
This worked for me
This could be an error with dependency, you may need to install react-native-codegen library like:
If you're using yarn packager:
yarn add --dev react-native-codegen
If you're using npm packager:
npm install react-native-codegen --force
And it will add the library in package.json
"dependencies": {
"react-native-codegen": "^0.0.7"
}
Check this link out for more info.
Also, I'll recommend you to follow React Native Upgrade Helper document for Package.json and Podfile changes.
I have a npm package, my-package, intended to be used by plain react native apps with a few dependencies listed in my package.json and the first two require native modules:
"dependencies": {
"#react-native-async-storage/async-storage": "^1.15.2",
"react-native-get-random-values": "^1.6.0",
"uuid": "^8.3.2"
},
I also included a my-package.podspec file at the root folder, though it mentions nothing about my dependencies so I'm not sure if it's relevant. The only lines I included are source_files and a bunch of metadata like name, version, etc.
Now I want to test to see if it works in a plain react native app, so I created one and run npm i -S my-package, then cd ios/ && pod install. I was expecting pod install to link/install my dependencies to Podfile.lock, but none of them got added, and the console output also doesn't mention them:
::> pod install
Analyzing dependencies
Downloading dependencies
Generating Pods project
Integrating client project
Pod installation complete! There are 49 dependencies from the Podfile and 40 total pods installed.
I want to allow people who use my package to be able to just call npm install my-package and pod install and be good to go. Am I missing some steps here, or is this not possible?
I just did a clean clone of my repo, did npm install and then pod install in the ios/ directory. This leads to a change in my Podfile.lock, which seemed to have upgraded a couple of modules to a newer version than what is specified in the package.json for that corresponding module, for example:
Podfile.lock:
- - react-native-webview (8.1.0):
+ - react-native-webview (8.2.1):
package.json:
"react-native-webview": "^8.1.0",
I would like to understand why this happens and whether this is a problem. I would avoid this but I can't do npm run ios, because it says that there are version issues and I have to run pod install.
When i get deep issues with Podfile/package.json, i do something like that:
Delete ./node_modules;
Delete package-lock.json and Podfile.lock;
Set a fixed version to component: "^8.1.0" -> "8.1.0" [w/o ^];
Do the npm install then pod install.
I have updated react-native version to latest.
So I have unlink all manually linked packages. But If i run react-native run-ios after pod install it shows the list of packages again to unlink.
error React Native CLI uses autolinking for native dependencies, but the following modules are linked manually
When pod install it shows the below error
[!] CocoaPods could not find compatible versions for pod "react-native-webview":
In Podfile:
react-native-webview (from `../node_modules/react-native-webview`)
Specs satisfying the `react-native-webview (from `../node_modules/react-native-webview`)` dependency were found, but they required a higher minimum deployment target.
I have changed the platform ios to 9.0 in podfile. It worked for me