Flutterfire Package Dependency errors on MacOs build - flutter

I have just transferred (via GitHub) my app repo from my WIn 11 machine to my Mac Mini M1 (Ventura) to start testing on iOS. All was going fairly well until I get this message when doing a pod install:
[15:20]
[!] CocoaPods could not find compatible versions for pod "Firebase/Database":
In Podfile:
firebase_database (from .symlinks/plugins/firebase_database/ios) was resolved to 10.0.9, which depends on
Firebase/Database (= 10.3.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 have tried all the answers I have seen on SO that relate to this but to no avail.
The app builds fine for Android on Win11 but gives the above dependencies error when building for iOS.
This is the command sequence I use to clean the environment on the Mac:
Delete pubspec.lock
Change to iOS directory
rm -rf Pods
rm -rf Podfile.lock
rm -rf ~/Library/Flutter/.pub-cache/hosted/pub.dartlang.org/
pod cache clean --all
flutter clean
flutter pub get
pod repo update
pod install
Anyone else experienced this with flutterfire packages? Any advice welcome. :-)
I am trying down-versioning some of them, but as you know that is a minefield and not the end solution.

Try to delete Podfile.lock file, then run pod install once again. If that does not help, try to upgrade flutter packages using flutter pub upgrade. Also pass —repo-update to pod install.

Related

Not able to compile flutter app in iOS because of image_picker_ios

I am compiling my application in iOS and am getting the following error
Could not build the precompiled application for the device.
Semantic Issue (Xcode): Unknown type name 'FLTMaxSize'
/Users/vikkasmiittal/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/image_picker_ios-0.8.5/ios/Classes/FLTImagePickerPlugin_Te
st.h:36:39
Semantic Issue (Xcode): Property with 'retain (or strong)' attribute must be of object type
/Users/vikkasmiittal/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/image_picker_ios-0.8.5/ios/Classes/FLTImagePickerPlugin_Te
st.h:36:0
Semantic Issue (Xcode): Cannot find protocol declaration for 'FLTImagePickerApi'
/Users/vikkasmiittal/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/image_picker_ios-0.8.5/ios/Classes/FLTImagePickerPlugin_Te
st.h:53:36
Parse Issue (Xcode): Could not build module 'image_picker_ios'
/Users/vikkasmiittal/Developer/flutterProj/sportsgiri/ios/Runner/GeneratedPluginRegistrant.m:39:8
a) This plugin works absolutely fine in Android
b) Flutter doctor does not show any error
c) Image picker version that I am using is 0.8.5+3 (the latest one)
Can any one please help me resolving this issue!!
Try cleanup of pods and reinstall.
rm -rf ~/Library/Caches/CocoaPods
rm -rf Pods
rm -rf ~/Library/Developer/Xcode/DerivedData/*
pod deintegrate
pod setup
pod install
Make sure to run flutter pub upgrade after editing the package version in the pubspec.yml.
Deleting Pods, Podfile.lock, running pod install and so on is not enough.

CocoaPods could not find compatible versions for pod "Sentry"

[!] CocoaPods could not find compatible versions for pod "Sentry":
In Podfile:
sentry_flutter (from .symlinks/plugins/sentry_flutter/ios) was resolved to 0.0.1, which depends on
Sentry (~> 7.11.0)
None of your spec sources contain a spec satisfying the dependency: `Sentry (~> 7.11.0)`.
I am just trying to install sentry_flutter plugin in my futter project. Currently i am testing in ios device. But it gives the above error.
The error message seems straight forward enough. But i cannot manage to include this plugin in my project.
you can run pod repo update to update your local cache bcause it may be outdated.
If it doesn't fix the issue for you, you can delete your Podfile.look file on ios folder and run pod install

How to fix an error that is occurred when install the pod in Flutter

I'm using the rwa_deep_ar package for the DeepAR feature in the Flutter project.
When I install the pod in MacOS, I see the following error.
I want to know how to fix this error and how to use the DeepAR for iOS in Flutter.
Kill the app
Run: flutter clean
Run: flutter pub get
Run: cd ios && pod install --repo-update
Podfile change platform :ios, '13.0' target set
Delete the folder and file from the project iOS folder
.symlinks folder
Pods folder
Podfile.lock file
flutter clean
flutter pub get
cd ios
pod install --repo-update

Flutter pod file conflict Fix

This is a note to myself for the next time I come across a similar error
I get this error when running pod install
[!] CocoaPods could not find compatible versions for pod "tau_core":
In Podfile:
flutter_sound (from `.symlinks/plugins/flutter_sound/ios`) was resolved to 7.7.1, which depends on
tau_core (= 7.7.0+1)
tau_core (= 2.2.0)
None of your spec sources contain a spec satisfying the dependencies: `tau_core (= 2.2.0), tau_core (= 7.7.0+1)`.
Fixed through:
Delete .symlink
delete podfile.lock
delete Pods folder
Make sure there are no dependencies that conflict in PodFile
Make sure in pubspec.yaml dependency is up to date
flutter clean
flutter pub upgrade
flutter pub get
cd ios
pod install
I followed the steps described above but I added an update for the pod repo, make sure to close VSCode after pod install otherwise it can cause errors
Delete .symlink
delete podfile.lock
delete Pods folder
Make sure there are no dependencies that conflict in PodFile
Make sure in pubspec.yaml dependency is up to date
flutter clean
flutter pub upgrade
flutter pub get
cd iOS
pod repo update
pod install

flutter: running pod install takes forever while building in debug mode

Using iphone 11 iOS-14 device and simulator, I have deleted THE podfile and podlock of my flutter app and trying to rebuild the app in debug MODE, i am using the latest firebase dependencies including cloud_firestore: ^0.14.1 dependency then it gets stuck at pod install and is taking forever to finish, been more than half an hour.
I wonder if i should wait longer or is there something wrong with firebase dependencies?
Pod install is not stuck, when you delete Podfile.lock, pod install will redownload all pod dependencies, will take a long time, after finish, it will create a new Podfile.lock
I have a project that have 20+ dependencies for flutter, firebase dependencies are the most complex ones
Add this line under target 'Runner' do in Podfile.
pod 'FirebaseFirestore', :git =>
'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag
=> '6.33.0'
Then in IOS:
flutter clean
pod repo update
For more info: https://github.com/FirebaseExtended/flutterfire/issues/2751
If you have spent 20-30 minutes of your time holding onto pod install and yet it seems to stuck forever (Possibly installed firebase dependencies then running same project on different machine). Then there are other workaround to it.
Clean cache and pub get your dependencies
flutter clean
flutter pub get
Navigate to your ios folder from the terminal
cd ios
Remove Trunk
pod repo remove trunk
If your current installation is in Intel Chipped Mac run the code below
pod install --repo-update
If your installation is in M1 chip device install ffi first
sudo arch -x86_64 gem install ffi
Then update POD
arch -x86_64 pod install --repo-update
Now clean and fetch dependencies
flutter clean
flutter pub get
If you encountered an error similar to like below
[!] 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`.
Then go to podfile, uncomment platmform:ios line and update it
platform :ios, '12.0'
Now re-run the command
arch -x86_64 pod install --repo-update
Don't Forget to clean pub caches with flutter clean
Check if your Xcode is up to date.
Updating my Xcode has resolved the issue for me.
I have tried all the above solutions but non have worked.
Only updating Xcode has worked.
Sometimes it seems that the 'pod install' command is taking forever, but it is downloading the dependencies in the background.
Please try to look into the Activity Monitor network tab to confirm that some data is being downloaded.
In my case, my pod depended on the Firebase pods, so it took around 10 minutes to complete my dependencies.
Recommended way on their official documentation is as follow:
Optional: Improve iOS & macOS build times by including the pre-compiled framework.
Currently, the Firestore SDK for iOS depends on code that can take upwards of 5 minutes to build in Xcode. To reduce build times significantly, you can use a pre-compiled version by adding this line to the target 'Runner' do block in your Podfile:
target 'Runner' do
pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => '8.15.0'
# ...
end
Additionally, ensure that you have upgraded CocoaPods to 1.9.1 or higher:
gem install cocoapods