I am trying to run my flutter app which is connected to Firebase, but when I try to run it on an iOS emulator, it shows these errors -
Warning: CocoaPods installed but not initialized. Skipping pod >install. CocoaPods is used to retrieve the iOS and macOS platform side's >plugin code that responds to your plugin usage on the Dart side. Without CocoaPods, plugins will not work on iOS or macOS. For more info, see https://flutter.dev/platform-plugins To initialize CocoaPods, run: pod setup once to finalize CocoaPods' installation.
So then I do "pod setup" but then it shows this error :
Cloning into 'master'...
remote: Enumerating objects: 14707, done.
remote: Counting objects: 100% (14707/14707), done.
remote: Compressing objects: 100% (14117/14117), done.
error: RPC failed; curl 18 transfer closed with outstanding read data
remaining
fatal: the remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed
To find if Cocoapods is installed or not run cmd (pod --version). if theresult is (Not Found) Pods is not installed.
For me it was due to cocoapods version. You can use this in your terminal:
sudo gem uninstall cocoapods
sudo gem install cocoapods -v 1.7.5
pod setup
A workaround for this issue is here: https://github.com/flutter/flutter/issues/41253
and also here: https://flutter.dev/docs/get-started/install/macos#deploy-to-ios-devices
(I'm using macOS Catalina JIC)
This should be fixed now with flutter version v1.9.1+hotfix.5
and above.
Try uninstalling all existing installations of cocoapods:
sudo gem uninstall cocoapods
brew uninstall cocoapods
Then install the latest version of cocoapods:
sudo gem install cocoapods
pod setup
I can confirm that this is working with flutter 1.12.13+hotfix.9
(stable channel), cocoapods version 1.9.1
, on macOS Catalina v10.15.4
.
After updating the Flutter version, faced the same issue.
Tried installing and uninstalling cocoapods
and still the same issue.
Finally, the issue resolved for me.
If you are using Android studio
File -> Invalidate Caches -> Invalidate and Restart
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With