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
Related
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.
I am receiving the following error when I compile my FLutter project after adding package:
purchases_flutter: ^4.0.1 to it ....
[!] CocoaPods could not find compatible versions for pod "purchases_flutter":
In Podfile:
purchases_flutter (from .symlinks/plugins/purchases_flutter/ios)
Specs satisfying the purchases_flutter (from .symlinks/plugins/purchases_flutter/ios)
dependency were found, but they required a higher minimum deployment target.
I have checked the Readme in PubDev for this package which says:
minimum targets iOS 9.0+ is required.
However when I look in my PoDFile I have platform :ios, '10.0'. And in Xcode:
Am I missing something here. I haven't seen any other Deployment targets in Xcode or Podfile.
Would really appreciate it, if someone could point me in the correct direction with this.
Many thanks.
I have also tried creating a new Flutter project to test this from the start again and used the terminal commands as suggested below.
I still get the same error... here is a full screen shot of my Android Studio window. Showing the error, my IOS drive and Podfile.
You need to prioritize your dependencies. If the problem is only with this package or plugin, just add it with flutter pub add [dependency name], avoiding directly writing pubspec.yaml It prevents conflict between package versions, automatically finding appropriate version. Then in Podfile top define minimum version. Delete pubspec.lock file, ios/Podfile.lock file and ios/Pods directory. Execute flutter pub get. Enter ios directory via Terminal, execute pod install and try to run application again. If your Mac has apple silicon chip pod install command will be a bit different. Let me know, it worked or not.
I'm new to android development and just installed android studio. It's the first time I'm opening studio. Gradle: Build model is taking long time. It's been already 50mins and still continuing and no message in console. I don't know what to do. Please help me.
Do you have a cloud_firestore package? If so, it usually adds to the build compilation time significantly. But you should provide more details - if its android emulator or iOS and your code.
If its Firestore Cloud + iOS emulator
Improve iOS Build Times# Currently the Firestore iOS SDK depends on
some 500k lines of mostly C++ code which can take upwards of 5 minutes
to build in XCode. To reduce build times significantly, you can use a
pre-compiled version by adding 1 line to your ios/Podfile inside your
Flutter project;
pod 'FirebaseFirestore', :git =>
'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag
=> '8.6.0'
Add this line inside your target 'Runner' do block in your Podfile,
e.g.:
# ... target 'Runner' do pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag
=> '8.6.0'
# ... end
Additionally, ensure that you have upgraded your cocoapods to 1.9.1 or higher: gem install cocoapods
For more information see this issue:
https://github.com/FirebaseExtended/flutterfire/issues/2751
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
I am exporting a project from Unity3d to xcode that uses the last GoogleMobileAds package.
I have installed and updated cocoapods and also have the famous podfile containing de following lines:
source 'https://github.com/CocoaPods/Specs.git'
install! 'cocoapods', :integrate_targets => false
platform :ios, ‘8.0’
target ‘MyProject’ do
pod 'Google-Mobile-Ads-SDK', '~> 7.14’
pod 'Firebase/Core'
pod 'Firebase/AdMob'
end
and I run
pod install
and
pod update
successfully
dependancies are downloaded alright, as you can see the results below:
Updating local specs repositories
CocoaPods 1.2.0.beta.1 is available.
To update use: `sudo gem install cocoapods --pre`
[!] This is a test version we'd love you to try.
For more information, see https://blog.cocoapods.org and the CHANGELOG for this version at https://github.com/CocoaPods/CocoaPods/releases/tag/1.2.0.beta.1
Analyzing dependencies
Downloading dependencies
Using Firebase (3.9.0)
Using FirebaseAnalytics (3.5.1)
Using FirebaseCore (3.4.4)
Using FirebaseInstanceID (1.0.8)
Installing Google-Mobile-Ads-SDK (7.14.0)
Using GoogleInterchangeUtilities (1.2.2)
Using GoogleSymbolUtilities (1.1.2)
Using GoogleToolboxForMac (2.1.0)
Generating Pods project
Skipping User Project Integration
Sending stats
Pod installation complete! There are 3 dependencies from the Podfile and 8 total pods installed.
According to both cocoapods and google mobile ads documentation, I will need to continue with "MyProject.xcworkspace" but the file is nowhere to be found.
any suggestions?
When using install! 'cocoapods', :integrate_targets => false Cocoapods will not create an xcworkspace for you.
That's the intended behaviour. You'll even notice this if you follow the command prompt. This line is telling you that no integration is taking place.
Skipping User Project Integration
If you want to get an xcworkspace just remove :integrate_targets => false
It seems the problem comes from editing the Podfile using TextEdit.
As it warns you that you should not continue using TextEdit, one could falsely suppose that the program is intelligent enough to understand and correct these unwanted modifications.
This is the solution I have found:
delete the Podfile and Podfile.lock from your working directory
create a new Podfile using pod init
install SublimeText and use it to open the Podfile
add the necessary pods for the project
(I also included the line "use_frameworks!" although it may not be
needed.)
run "pod install" and "pod update"; this time I get
[!] Please close any current Xcode sessions and use Orbit.xcworkspace for this project from now on.
and the file is now available in project directory
You was used this guide for install pod?
In addition to Radu Dita's message. If you do not want that line to be added (so you do not need to delete it later), you need to disable cocoapods integration in "iOS Resolver Settings" by selecting "None", build project and then enable it back "Xcode Workspace". I found this with try and error. I hope my message will save save someone's time