iOS ReactNative Firebase Library pod upgrade issue on M1 Mac - ios

I have tried
rm -rf Podfile.lock
pod install --repo-update
and all other suggestions. but nothing worked. I'm getting this error message.
[!] Unable to find a specification for FirebaseCoreExtension (= 10.3.0) depended upon by RNFBMessaging
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.
Here's my pod file
Here's my react-native info
System:
OS: macOS 13.0.1
CPU: (10) arm64 Apple M1 Pro
Memory: 157.45 MB / 16.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 16.16.0 - /usr/local/bin/node
Yarn: 1.22.19 - /usr/local/bin/yarn
npm: 8.11.0 - /usr/local/bin/npm
Watchman: 2023.01.30.00 - /opt/homebrew/bin/watchman
Managers:
CocoaPods: 1.11.3 - /usr/local/bin/pod
SDKs:
iOS SDK: Not Found
Android SDK: Not Found
IDEs:
Android Studio: 2021.3 AI-213.7172.25.2113.9123335
Xcode: /undefined - /usr/bin/xcodebuild
Languages:
Java: 11.0.13 - /usr/bin/javac
Python: Not Found
npmPackages:
#react-native-community/cli: Not Found
react: 16.13.1 => 16.13.1
react-native: 0.63.5 => 0.63.5
react-native-macos: Not Found
npmGlobalPackages:
*react-native*: Not Found

Related

Flutter pod install error with firebase messaging on ios

Command "pod install" can't be executed when run on ios flutter app folder.
Error as the following:
Analyzing dependencies
firebase_core: Using Firebase SDK version '10.0.6' defined in 'firebase_core'
firebase_messaging: Using Firebase SDK version '10.0.6' defined in 'firebase_core'
[!] CocoaPods could not find compatible versions for pod "Firebase/Messaging":
In Podfile:
firebase_messaging (from .symlinks/plugins/firebase_messaging/ios) was resolved to 10.0.6, which depends on
Firebase/Messaging (= 10.0.6)
None of your spec sources contain a spec satisfying the dependency: Firebase/Messaging (= 10.0.6).
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.
We have this package on pubspec.yaml
firebase_core: ^1.6.0
firebase_messaging: ^10.0.6
on podfile:
platform :ios, '10.0'
We use pod version:
1.11.0.rc.1
macOS Big Sur version:
11.2.1
If we delete this packages from pubspec.yaml, pod install work fine.
We tried many ways to no avail!
pod install --repo-update this donst help;
also cocoa pods installation in M1 dosnt resolve this problem;
Always when you add a new dependency on IOS you should do:
cd ios/
rm -rf Pods/
rm -rf Podfile.lock
cd ..
flutter clean
flutter pub get
cd ios
pod install
pod install --repo-update ( if needed)
This always help me to fix dependencies issues on IOS
Problem was resolved using this command
flutter pub cache repair
Thank you for all!
If anyone showed here, I fixed this by running the pod update command inside the iOS directory.

How do I resolve the pod install error on flutter?

cloud_firestore: ^0.16.0
firebase_auth: ^0.20.0+1
smooth_star_rating: ^1.0.4
google_maps: ^4.0.0
firebase_core: ^0.7.0
rxdart: ^0.24.1
Pod install
Analyzing dependencies cloud_firestore: Using Firebase SDK
version '7.3.0' defined in 'firebase_core' firebase_auth: Using
Firebase SDK version '7.3.0' defined in 'firebase_core' firebase_core:
Using Firebase SDK version '7.3.0' defined in 'firebase_core' [!]
CocoaPods could not find compatible versions for pod
"cloud_firestore": In Podfile:
cloud_firestore (from .symlinks/plugins/cloud_firestore/ios)
Specs satisfying the cloud_firestore (from .symlinks/plugins/cloud_firestore/ios) dependency were found, but
they required a higher minimum deployment target.
[!] Automatically assigning platform iOS with version 9.0 on
target Runner because no platform was specified. Please specify a
platform for this target in your Podfile. See
https://guides.cocoapods.org/syntax/podfile.html#platform.
I get this error on terminal whenever I try to install pod.
As the error said, we have incompatibility with the firebase package so:
I went to the Podfile and upgrade to 10 (platform :ios, '10.0') and the error go away;
as additional note:
I had that line commented before, so my first try was uncomment and upgrade to 9, but it wasn't work.
This problem mainly occur when using a MacBook with the M1 chip.
CocoaPods could not find compatible versions for pod "Firebase/Messaging":
In Podfile:
firebase_messaging (from .symlinks/plugins/firebase_messaging/ios) was resolved to 10.0.0, which depends on
Firebase/Messaging (= 8.0.0)
The Solution here is to try the following steps:
Cocoa Pods Installation in M1
sudo gem install cocoapods
sudo gem install ffi
arch -x86_64 sudo gem install cocoapods -n /usr/local/bin
sudo gem install cocoapods -n /usr/local/bin
Install ffi
sudo arch -x86_64 gem install ffi
#update repo
arch -x86_64 pod install --repo-update
Flutter iOS builds
flutter clean
flutter build ios
Re-install dependency in iOS folder of flutter project
arch -x86_64 pod install
upgrade to 10 (platform :ios, '10.0') its work but face another issue
cloud_firestore: ^0.16.0
Error: CocoaPods's specs repository is too out-of-date to satisfy dependencies.
Solution
It can be solved by executing the following commands in the terminal.
Go to /ios folder inside your Project.
Delete Podfile.lock
Run pod install --repo-update (Make sure your cd into the iOS directory of the flutter app)
Run flutter clean
Once complete, rebuild your Flutter application: flutter run
arch -x86_64 pod install --repo-update works, i just tried it before but then i realised that you have to delete the Podfile.lock file located in your ios folder app/ios.
I've also updated the platform to "platform :ios, '12.0'" & this is what it's working on.
This answer works: https://stackoverflow.com/a/67636592/12592516.
Then you just have remove Podfile.lock
And this is on M1 chip.
I've struggled a lot with this but now I understand, I hope that this helps!
Thank you for the answer! It took quite some time to figure this out. For those looking and using Visual Studio Code. After you run the debugger, and Podfile will be created for you. At the top of the Podfile file in the ios/ directory, uncomment the line to read:
platform :ios, '10.0'
Go To your iOS folder, run pod repo remove trunk
then pod update.. and it will be fixed.
You can reference these link:
https://github.com/googleads/googleads-mobile-flutter/issues/594
https://github.com/firebase/flutterfire/issues/9152
I changed this in file pubspec.yaml and resolve my problem
google_mobile_ads:
git:
url: https://github.com/googleads/googleads-mobile-flutter
ref: 356875362ddb2ac2e0056385d2729c093722fb8d
path: packages/google_mobile_ads
My final file look like this
# google_mobile_ads: ^1.3.0
google_mobile_ads:
git:
url: https://github.com/googleads/googleads-mobile-flutter
ref: 356875362ddb2ac2e0056385d2729c093722fb8d
path: packages/google_mobile_ads
# firebase_core: ^1.20.0
firebase_core: ^1.18.0
# firebase_analytics: ^9.3.0
firebase_analytics: ^9.1.10
I encounterwd this problem with my mac m1 pro.
Removed the Podfile from my project.
I was using terminal inside the VSCode kept getting errors.
[!] No `Podfile' found in the project directory.
Opened terminal on my macbook and ran:
Updating local specs repositories
Analyzing dependencies
cloud_firestore: Using Firebase SDK version '9.3.0' defined in 'firebase_core'
firebase_auth: Using Firebase SDK version '9.3.0' defined in 'firebase_core'
firebase_core: Using Firebase SDK version '9.3.0' defined in 'firebase_core'
firebase_messaging: Using Firebase SDK version '9.3.0' defined in 'firebase_core'
firebase_storage: Using Firebase SDK version '9.3.0' defined in 'firebase_core'
Downloading dependencies
Installing BoringSSL-GRPC (0.0.24)
Installing Firebase (9.3.0)
Installing FirebaseAppCheckInterop (9.4.0)
Installing FirebaseAuth (9.3.0)
Installing FirebaseAuthInterop (9.4.0)
Installing FirebaseCore (9.3.0)
Installing FirebaseCoreDiagnostics (9.4.0)
Installing FirebaseCoreExtension (9.4.0)
Installing FirebaseCoreInternal (9.4.0)
Installing FirebaseFirestore (9.3.0)
Installing FirebaseInstallations (9.4.0)
Installing FirebaseMessaging (9.3.0)
Installing FirebaseStorage (9.3.0)
Installing FirebaseStorageInternal (9.3.0)
Installing Flutter (1.0.0)
Installing GTMSessionFetcher (2.0.0)
Installing GoogleDataTransport (9.2.0)
Installing GoogleUtilities (7.7.0)
Installing Libuv-gRPC (0.0.10)
Installing PromisesObjC (2.1.1)
Installing abseil (1.20211102.0)
Installing cloud_firestore (3.4.3)
Installing firebase_auth (3.6.2)
Installing firebase_core (1.20.0)
Installing firebase_messaging (11.4.4)
Installing firebase_storage (10.3.4)
Installing gRPC-C++ (1.44.0)
Installing gRPC-Core (1.44.0)
Installing leveldb-library (1.22.1)
Installing nanopb (2.30909.0)
Generating Pods project
Integrating client project
Pod installation complete! There are 6 dependencies from the Podfile and 30 total pods installed.
enter image description here
After that finished I ran the same command: arch -x86_64 pod install --repo-update inside VSCode and said: Pod installation complete! There are 6 dependencies from the Podfile and 30 total pods installed.
They key was removing Podfile from my project. Hopefully this helps.

Error when starting project from command line

I installed the package using npm I then followed these instructions (french) to configure it for iOS. But I can't run the app using npx react-native run-ios, it gives me this error:
xcodebuild: error: Could not resolve package dependencies:
because no versions of facebook-ios-sdk match the
requirement 7.0.2..<8.0.0 and root depends on
facebook-ios-sdk 7.0.2..<8.0.0, version solving failed.
I tried to reinstall react-native-fbsdk and also installing pods again:
$ cd ios
$ rm Podfile.lock
$ pod repo update
$ pod install
Adding a custom script phase for Pod RNFBApp: [RNFB] Core Configuration
Auto-linking React Native modules for target `XXX`: RNCMaskedView, RNFBApp, RNFBAuth, RNGestureHandler, RNGoogleSignin, RNReanimated, RNScreens, RNVectorIcons, react-native-fbsdk, react-native-get-random-values, react-native-safe-area-context, and react-native-webview
Analyzing dependencies
Fetching podspec for `DoubleConversion` from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`
Fetching podspec for `Folly` from `../node_modules/react-native/third-party-podspecs/Folly.podspec`
Fetching podspec for `glog` from `../node_modules/react-native/third-party-podspecs/glog.podspec`
Downloading dependencies
Installing FBSDKCoreKit 7.1.1 (was 7.0.1 and source changed to `https://cdn.cocoapods.org/` from `trunk`)
Installing FBSDKLoginKit 7.1.1 (was 7.0.1 and source changed to `https://cdn.cocoapods.org/` from `trunk`)
Installing FBSDKShareKit 7.1.1 (was 7.0.1 and source changed to `https://cdn.cocoapods.org/` from `trunk`)
Generating Pods project
Integrating client project
Pod installation complete! There are 41 dependencies from the Podfile and 59 total pods installed.
On the other hand I have no issue running it from xcode (even though the error still show up).
My npm environment is the following:
{
"react-native": "0.62.2",
"react-native-fbsdk": "^2.0.0",
}
I still have no idea what's going on with the installation as proposed in the documentation. But we solved the problem in Xcode by updating facebook-ios-sdk:
file > Swift packages > Update to latest package versions.
After running this, facebook-ios-sdk version appears in Xcode (for us it was 7.1.1). And then the error goes away.

Flutter 'Error running pod install' 'Pods-Runner' target has transitive dependencies

When trying to run my flutter project I get:
Error running pod install
(I saw another very similar post but I'm not sure if I'm having the same issue.)
I'm writing Dart code with Flutter on macOS Mojave version 10.14.6.
I've tried:
flutter clean
flutter doctor
flutter upgrade
`flutter precache
flutter run
I've tried every flutter command in every possible combination of said commands, but still get the same error.
flutter doctor:
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel beta, v1.9.1+hotfix.4, on Mac OS X 10.14.6 18G103, locale en-US)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 11.0)
[✓] Android Studio (version 3.5)
[✓] IntelliJ IDEA Ultimate Edition (version 2019.1.2)
[✓] Connected device (1 available)
• No issues found!
flutter run:
Launching lib/main.dart on iPhone 11 Pro Max in debug mode...
Running pod install... 1.3s
CocoaPods' output:
↳
Preparing
Analyzing dependencies
Inspecting targets to integrate
Using `ARCHS` setting to build architectures of target `Pods-Runner`: (``)
Finding Podfile changes
M Flutter
- barcode_scan
- flutter_webview_plugin
- google_sign_in
- path_provider
- shared_preferences
- sqflite
- url_launcher
Fetching external sources
-> Fetching podspec for `Flutter` from `.symlinks/flutter/ios`
-> Fetching podspec for `barcode_scan` from
`.symlinks/plugins/barcode_scan/ios`
-> Fetching podspec for `flutter_webview_plugin` from
`.symlinks/plugins/flutter_webview_plugin/ios`
-> Fetching podspec for `google_sign_in` from
`.symlinks/plugins/google_sign_in/ios`
-> Fetching podspec for `path_provider` from
`.symlinks/plugins/path_provider/ios`
-> Fetching podspec for `shared_preferences` from
`.symlinks/plugins/shared_preferences/ios`
-> Fetching podspec for `sqflite` from `.symlinks/plugins/sqflite/ios`
-> Fetching podspec for `url_launcher` from
`.symlinks/plugins/url_launcher/ios`
Resolving dependencies of `Podfile`
CDN: trunk Relative path: CocoaPods-version.yml exists! Returning local
because checking is only performed in repo update
Comparing resolved specification to the sandbox manifest
A FMDB
A Flutter
A GTMSessionFetcher
A GoogleSignIn
A GoogleToolboxForMac
A MTBBarcodeScanner
A barcode_scan
A flutter_webview_plugin
A google_sign_in
A path_provider
A shared_preferences
A sqflite
A url_launcher
Downloading dependencies
-> Installing FMDB (2.7.5)
> Copying FMDB from
`~/Library/Caches/CocoaPods/Pods/Release/FMDB/2.7.5-2ce
00` to `Pods/FMDB`
-> Installing Flutter (1.0.0)
-> Installing GTMSessionFetcher (1.2.2)
> Copying GTMSessionFetcher from
`~/Caches/CocoaPods/Pods/Release/GTMSessionFetc
her/1.2.2-61bb0` to `Pods/GTMSessionFetcher`
-> Installing GoogleSignIn (4.4.0)
> Copying GoogleSignIn from
`~/Library/Caches/CocoaPods/Pods/Release/GoogleSignIn/4
.4.0-7ff24` to `Pods/GoogleSignIn`
-> Installing GoogleToolboxForMac (2.2.1)
> Copying GoogleToolboxForMac from
`~/Library/Caches/CocoaPods/Pods/Release/GoogleToolboxF
orMac/2.2.1-b3553` to `Pods/GoogleToolboxForMac`
-> Installing MTBBarcodeScanner (5.0.11)
> Copying MTBBarcodeScanner from
`~/Library/Caches/CocoaPods/Pods/Release/MTBBarcodeScan
ner/5.0.11-f453b` to `Pods/MTBBarcodeScanner`
-> Installing barcode_scan (0.0.1)
-> Installing flutter_webview_plugin (0.0.1)
-> Installing google_sign_in (0.0.1)
-> Installing path_provider (0.0.1)
-> Installing shared_preferences (0.0.1)
-> Installing sqflite (0.0.1)
-> Installing url_launcher (0.0.1)
- Running pre install hooks
[!] The 'Pods-Runner' target has transitive dependencies that include
statically linked binaries:
(<flutter_project_repo>/ios/.symlinks/flutter/ios/Flutte
r.framework)
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.1/lib/cocoapods/installer/xcode/
target_validator.rb:84:in `block (2 levels) in
verify_no_static_framework_transitive_dependencies'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.1/lib/cocoapods/installer/xcode/
target_validator.rb:74:in `each_key'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.1/lib/cocoapods/installer/xcode/
target_validator.rb:74:in `block in
verify_no_static_framework_transitive_dependencies'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.1/lib/cocoapods/installer/xcode/
target_validator.rb:73:in `each'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.1/lib/cocoapods/installer/xcode/
target_validator.rb:73:in
`verify_no_static_framework_transitive_dependencies'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.1/lib/cocoapods/installer/xcode/
target_validator.rb:38:in `validate!'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.1/lib/cocoapods/installer.rb:590
:in `validate_targets'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.1/lib/cocoapods/installer.rb:158
:in `install!'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.1/lib/cocoapods/command/install.
rb:52:in `run'
/Library/Ruby/Gems/2.3.0/gems/claide-1.0.3/lib/claide/command.rb:334:in
`run'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.1/lib/cocoapods/command.rb:52:in
`run'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.1/bin/pod:55:in `<top
(required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'
Error output from CocoaPods:
↳
[!] Automatically assigning platform `iOS` with version `8.0` on target
`Runner` because no platform was specified. Please specify a platform for
this target in your Podfile. See
`https://guides.cocoapods.org/syntax/podfile.html#platform`.
Error running pod install
Error launching application on iPhone 11 Pro Max.
I also updated a bunch of different programs like cocoapods and rubygems.
I think it has something to do with one of these installations:
-> Installing MTBBarcodeScanner (5.0.11)
> Copying MTBBarcodeScanner from
`~/Library/Caches/CocoaPods/Pods/Release/MTBBarcodeScan
ner/5.0.11-f453b` to `Pods/MTBBarcodeScanner`
-> Installing barcode_scan (0.0.1)
Because it uses the versions in my pubspec.yaml,
then just start using 0.0.1 for some reason.
pubspec.yaml
...
version: 1.0.0+1
environment:
sdk: ">=2.2.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
easy_localization: ^1.3.1
...
flutter run
Error running pod install
Not sure what else I can do to get a better error message...
You can see the error in the message
[!] Automatically assigning platform `iOS` with version `8.0` on target
`Runner` because no platform was specified. Please specify a platform for
this target in your Podfile.
So, go to the file ios/Podfile inside your project, find there the line
# platform :ios, '9.0'
and uncomment it.
After that delete ios/Podfile.lock file and run project again (or pod update)
cd ios/
rm Podfile.lock
pod install
pod repo update
run this code on the terminal
sudo arch -x86_64 gem install ffi
Next, go to the ios folder in your project, and open Podfile.
find there the line
#platform :ios, '9.0'
remove the # and change the 9.0 to 10.0, and the final code should be like the below
platform :ios, '10.0'

Flutter:error running pod install after upgrading to flutter facebook login v3.00

I just change the flutter facebook plugin from 2.0.0 to 3.0.0 and now I am getting POD error when I execute flutter build.
Need some help how debug and fix this issue
MY POD file snippet
platform :ios, '9.0'
flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
project 'Runner', {
'Debug' => :debug,
'Profile' => :release,
'Release' => :release,
}
pod 'FBSDKCoreKit', '4.39.1'
pod 'FBSDKLoginKit', '4.39.1'
--- This error message ----
This is the error dump
CocoaPods' output:
↳
Preparing
Analyzing dependencies
Inspecting targets to integrate
Using `ARCHS` setting to build architectures of target `Pods-Runner`: (``)
Finding Podfile changes
M Flutter
- FBSDKCoreKit
- FBSDKLoginKit
- file_picker
- firebase_analytics
- firebase_auth
- firebase_core
- firebase_crashlytics
- firebase_dynamic_links
- firebase_messaging
- firebase_remote_config
- flutter_facebook_login
- flutter_statusbarcolor
- google_sign_in
- keyboard_visibility
- location
- package_info
- path_provider
- share
- shared_preferences
- url_launcher
Resolving dependencies of `Podfile`
[!] CocoaPods could not find compatible versions for pod "FBSDKLoginKit":
In snapshot (Podfile.lock):
FBSDKLoginKit (= 4.39.1)
In Podfile:
FBSDKLoginKit (= 4.39.1)
flutter_facebook_login (from `.symlinks/plugins/flutter_facebook_login/ios`) was resolved to 0.0.1, which depends on
FBSDKLoginKit (~> 5.5)
Specs satisfying the `FBSDKLoginKit (= 4.39.1), FBSDKLoginKit (= 4.39.1), FBSDKLoginKit (~> 5.5)` dependency were found, but
they required a higher minimum deployment target.
/usr/local/Cellar/cocoapods/1.6.1/libexec/bin/pod:22:in `load'
/usr/local/Cellar/cocoapods/1.6.1/libexec/bin/pod:22:in `<main>'
Error running pod install
I have clear the cache but I still get the error..
Delete
Podfile.lock
Then run
pod install.
It worked for me.
Am using
flutter_facebook_login
You can try to run the following in the ios directory:
$ pod repo update
$ pod install
You might need to delete the Podfile.lock file first (i'm not sure it helps but it's what i did).
to fix used two commands:
- pod repo update
- pod update FBSDKCoreKit
——————————————————————
after pod repo update :
MacRoberto-8:Nixtelecom robertofonseca$ cd ios
MacRoberto-8:ios robertofonseca$ pod update FBSDKCoreKit
Updating local specs repositories
Analyzing dependencies
Downloading dependencies
Installing BoringSSL-GRPC (0.0.3)
Installing FBSDKCoreKit (5.6.0)
Installing FBSDKLoginKit (5.6.0)
Installing firebase_core (0.0.1)
.
.
.
.
Generating Pods project
Integrating client project
Pod installation complete! There are 14 dependencies from the Podfile and 37 total pods installed.
MacRoberto-8:Nixtelecom robertofonseca$ flutter build ios --release
.
.
=== BUILD TARGET Runner OF PROJECT Runner WITH CONFIGURATION Release ===

Resources