I hope you all are doing well.
I'm facing issue while trying to init the pod in the project. Cocoapods is already installed in the system. XCode Dev intstall is also there, In XCode in command line the xcode version is also selected. Don't know what I'm missing. I have MacOS BigSur.
If I run pod --version command on terminal it gives me version of 1.8.4.
I'm attaching the screenshot if someone has faced this issue.
I have the same issue. I solved it by following these steps:
First uninstall cocoapods with the command:
brew uninstall cocoapods
Reinstall Cocoapods:
sudo gem install cocoapods
I updated yesterday to the new Android Studio 2021.1.1
Now i get the following error, when i run my app on the ios emulator:
Warning: CocoaPods is installed but broken. Skipping pod install.
You appear to have CocoaPods installed but it is not working.
This can happen if the version of Ruby that CocoaPods was installed with is different from the one being used to invoke it.
This can usually be fixed by re-installing CocoaPods. For more info, see https://github.com/flutter/flutter/issues/14293.
To re-install:
sudo gem install cocoapods
CocoaPods not installed or not in valid state.
I tried everything for many hours.
At the end i go back to Android Studio 2020 previous version and it works perfect.
Any ideas?
Update:
This works for me:
uninstall cocoapods then
reinstalling cocoapods via homebrew.
Afterwards I did an "pod repo update"
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
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)
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
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.
sudo gem install cocoapods -v 1.10.0 -n /usr/local/bin
I was battling with this issue for days on end. The issue, for me was only when I use my Mac with M1 Chip. Initially, i got this error when I tried to add a audio player package to my project. After a week of seaching I came across the this solutionenter link description here
The worked perfectly until i needed to use a geolocation package and the issue was back again. After days of trying different solutions, I finally found that the solution that worked for me. I reinstalled cocoapods using brew. Once done, I closed the terminal, closed android studio then ran the following command on terminal open /Applications/Android\ Studio.app. Pod now installs with no issues and my project launches on iOS.
Run the commands in your terminal (but not in the AndroidStudio for example):
sudo gem install cocoapods
pod setup
After, run:
flutter build ios
In flutter, I solve this issue by opening an android studio with terminal
use this line on your terminal
open /Applications/Android\ Studio.app
Can anyone help to find if cocoaPod is installed in my machine. I was trying to use Google Map in my application. So i was asked to install CocoaPods. Could any one help me explain me the purpose.
try to find pod version by running this in terminal
pod --version
If command not found then you didn't installed
To install cocoapods
sudo gem install cocoapods
Reference : https://cocoapods.org
Solution found: Initially the Cocoapods has to be installed using the command sudo gem install cocoapods (I had some problem with proxies so it dint work for me initially and i resolved it).
To find if Cocoapods is installed or not run cmd (pod --version). if theresult is (Not Found) Pods is not installed. Please check for the internet connection and their proxies, these things took me huge time.
Enter this line and see if you get error:
pod search realm
I found out that the way to resolve an issue, in a library i'm using, is to add use_frameworks! to the podfile. When i run pod install on the terminal, i get the following error:
[!] Invalid Podfile file: undefined method `use_frameworks!' for #.
Updating CocoaPods might fix the issue.
I'm using Cocoapods so i don't understand this issue. This tag is required for projects using swift, i'm using objective-c.
Looks to me like the second part of that error message:
Updating CocoaPods might fix the issue.
Is your issue. use_frameworks! was added in CocoaPods 0.36.0 which was just released recently.
Use pod --version to see what you're currently running. Assuming it's earlier than 0.36.0 you'll need to update it with
[sudo] gem install cocoapods
Which is just the same way you originally installed it.
I had the same issue when trying to run pod install on my mac.
So incase anyone encounters this issue what worked for me was changing the current ruby version with rvm.
On console, Use rvm list to see what versions you have installed:
So the version of ruby that was running on my mac was ruby-2.1.2.
I changed it with:
rvm use ruby-2.2.2
and ran pod install again and it worked.