I am trying to install firebase analytics in my react native application. For that I am following the link for documentation
https://enappd.com/blog/firebase-analytics-in-react-native-app/101/
My iOS deployment target is 9.0 in the xcode and also 9.0 in the Pods file. But when I tried to install the two plugins
yarn add #react-native-firebase/analytics
yarn add #react-native-firebase/app
I tried to do
cd ios && pod install
I got the error:
[!] CocoaPods could not find compatible versions for pod "RNFBApp":
In Podfile:
RNFBApp (from `../node_modules/#react-native-firebase/app`)
Specs satisfying the `RNFBApp (from `../node_modules/#react-native-firebase/app`)` dependency were found, but they required a higher minimum deployment target.
Then I googled this error none of them are working solution for me. I tried
rm Podfile.lock
pod install --repo-update
Still the same issue
Then I updated the deployment target to 10.0. Then it was installed successfully. But now I am not able to build the application for iOS because it is giving error
Typedef redefinition with different types ('uint8_t' (aka 'unsigned char') vs 'enum clockid_t')
This was happening in the Flipper library of the react native. Then I reverted back my code and now my deployment target is again 9.0 and I am stuck.
Please anyone can guide me to solve this issue.
Related
I've just updated Firebase in my Unity project to Firebase 10.4.0 and now when I try to build, I get the error below while failing the build.
Error building Player: iOS framework addition failed due to a CocoaPods installation failure. This will will likely result in an non-functional Xcode project.
After the failure, "pod repo update" was executed and failed. "pod install" was then attempted again, and still failed. This may be due to a broken CocoaPods installation. See: https://guides.cocoapods.org/using/troubleshooting.html for potential solutions.
I've checked minimum compatibility with the new version of Firebase and am using what's listed below.
Unity 2021.3.18f1
Cloud Firestore, Firebase App(Core), and Firebase Cloud Messaging 10.4.0
External Dependency Manager for Unity 1.2.175
Cocoapods I've tried versions 1.10.2 and 1.11.3 (started with 1.10.2 when I got the issue, redownloaded 1.10.2 to no avail and then tried 1.11.3, same issue)
Ruby 2.6.10p210
I could be wrong, but it seems like Unity is not detecting my current version of cocoapods, trying to install it, and failing.
Any help is greatly appreciated, I've spent 2 days on this already :/
I've redownloaded cocoapods version 1.10.2 as well as updated to 1.11.3 and the error persists. I've checked dependancies and everything seems to be compatible.
I've looked at other stack overflow posts and nothing has helped with my issue.
At first i did npm install --save #react-native-firebase/app then cd ios and then pod install and get error like that..
[!] The following Swift pods cannot yet be integrated as static libraries:
The Swift pod FirebaseCoreInternal depends upon GoogleUtilities, which does not define modules. To opt into those targets generating module maps (which is necessary to import them from Swift when building as static libraries), you may set use_modular_headers! globally in your Podfile, or specify :modular_headers => true for particular dependencies.
then i use my pod file use_modular_headers! globally...then pod install done ,but when i ran the project from xcode it gives me the Error..."glog.glog.log_severity' appears within namespace 'google" please help i dont know xcode and can't solve the issue ...please help ...thanks advance
I just initialized a bare react native project yesterday and ran into this exact same problem when setting up Firebase. I can't remember the exact sequence of steps I took to fix it, but my current Podfile doesn't include use_modular_headers!. Instead, I used "use_frameworks!" globally in my Podfile, and commented out the use_flipper!() at the bottom as recommended in the comments. If you get the same initial error about static libraries, try switching the environment you're running from. I.E. if you've been trying from terminal by "npx react-native run..." use Xcode to compile the build, and vice versa. Hopefully that works, it did for me!
i have followed an exact guide on how to setup a geofire on to my project. i have success on my android project.. but i cant get it to run for the ios.. and it has the following error as i try to run it.
[!] CocoaPods could not find compatible versions for pod "Firebase/Database":
In Podfile:
firebase_database (from `.symlinks/plugins/firebase_database/ios`) was resolved to 6.1.2, which depends on
Firebase/Database (= 7.11.0)
flutter_geofire (from `.symlinks/plugins/flutter_geofire/ios`) was resolved to 0.0.1, which depends on
GeoFire (~> 4.0) was resolved to 4.1.0, which depends on
Firebase/Database (~> 6.0)
I've tried to run pod update and this is the result
Macbook-MBP:ios Macbook$ pod update
Update all pods
Updating local specs repositories
Analyzing dependencies
firebase_auth: Using Firebase SDK version '7.11.0' defined in 'firebase_core'
firebase_core: Using Firebase SDK version '7.11.0' defined in 'firebase_core'
firebase_database: Using Firebase SDK version '7.11.0' defined in 'firebase_core'
[!] CocoaPods could not find compatible versions for pod "Firebase/Database":
In Podfile:
firebase_database (from `.symlinks/plugins/firebase_database/ios`) was resolved to
6.1.2, which depends on Firebase/Database (= 7.11.0)
flutter_geofire (from `.symlinks/plugins/flutter_geofire/ios`) was resolved to 0.0.1,
which depends on
GeoFire (~> 4.0) was resolved to 4.1.0, which depends on
Firebase/Database (~> 6.0)
and this is what i've imported to my pubspec.yaml file..
firebase_database: ^6.1.2
flutter_geofire: ^2.0.0
i dont understand what im doing wrong, any help would be appreciated.. thanks
for anyone that is facing this issue,
run flutter clean in the terminal
add this line at the bottom of the podfile
pod 'GeoFire', :git => 'https://github.com/mrdishant/geofire-objc', :tag => '4.3.0'
dont forget to add use_frameworks! on top of the podfile
delete Pod folder from iOS.
change platform :ios, '10.0' to platform :ios, '11.0' on the podfile
run pod repo update then pod update
then run flutter run in the terminal
thats how i got it working for me
Updating the platform configured in the Podfile to platform :ios, '10.0' didn't work for me. I've had to update the iOS Deployment Target to 10.0 - located on Runner > Info > Deployment Target
After that, deleting the Podfile.lock with rm -rf Podfile.lock then running pod update and pod install solved the issue for me.
Same issue here. I've been trying to fix for weeks. Can't find anything online either. If you figure it out please post! Sorry, I do not have enough 'reputation points' to comment yet :(
Faced the same challenge but all of the above solutions didn't work for me.
What worked for me:
Following the link shown in the error (I've highlighted):
enter image description here
In you IDE, go to Project File -> ios -> .symlinks -> plugins -> firebase_database -> ios
enter image description here
Open the .podspec file of the dependency.
enter image description here
Look for: s.ios.deployment_target = '12.0'
I think the "s.ios.deployment_target" should be less than or equal to the "platform :ios, 'XX.0'" in the Podfile.
enter image description here
After changing s.ios.deployment_target value to less than in the platform :ios, in the podfile, try removing Podfile.lock, pod install --repo-update etc.
Do the same for other podfiles throwing the error, in your case: flutter_geofire, firebase_database etc.
You can check this solution too. [https://stackoverflow.com/questions/65881232/specs-satisfying-the-firebase-admob-but-they-required-a-higher-minimum-deploy]
I'm having a hard time with firebase CLI,when I install it with npm, either locally in a projet or globally, and I call the command firebase it gives Segmentation fault with no further details.
I firs thought that the problem was with my version of Node since I was using 9.x, I moved back to 8.x versions, and reinstalled firebase with no success, I upgraded to 12.x, with no success too always same error.
I'm using NVM to handle my node versions properly, but still I can't find a fix for this problem.
nvm list gives this :
-> v8.11.3
v8.13.0
v12.3.0
system
When I run npm list firebase-tools it gives firebase-tools#7.9.0, I also tried uninstalling and reinstalling with no success .
I'm trying to add Firebase/MLVision to my iOS app, but running pod install gives me this:
[!] CocoaPods could not find compatible versions for pod "Firebase/MLVision":
In Podfile:
Firebase/MLVision
Specs satisfying the `Firebase/MLVision` dependency were found, but they required a higher minimum deployment target.
What do I do? Any kind of help is highly appreciated!
After trying different things for some time, I found my answer here: https://stackoverflow.com/a/46613676/1585677
Basically removing the Firebase/MLVision from pod file, then running
pod repo update
pod update
Then adding Firebase/MLVision to Podfile and running pod install
Looks like your Pod file is not valid, or isn't targeting your project. You can see a working codelab here if you have doubts.
Likely, the ios version specified in the Podfile is too low. It needs to be at least 8.0 for Firebase 5.x, including the MLVision subspec:
platform :ios, '8.0'