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
Related
Not working below commands on MacBook Terminal:
gem install cocoapods,
gem install cocoapods-art
Getting bellow error message:
ERROR: Could not find a valid gem 'cocoapods' (>= 0) in any repository
I have tried many solutions which are available on Google/Stackoverflow but not worked.
Thanks in advance.
If you have satisfied other conditions and you wish to install the latest version of cocoapods, you may wish to install using homebrew.
To do that, you can install with this command on your terminal;
brew install cocoapods
You will be required to link cocoapods after installing - to link, use;
brew link --overwrite cocoapods
Hope it works for you...
There can be different reasons for this.
Make sure you have Xcode installed on the system (its components too, Which it asks us to install on installation)
It can happen due to some network issues.try disabling IPv6, your can also try with a VPN connected and not connected both. ( you can also try this software, connect it and try:https://developers.cloudflare.com/warp-client/get-started/macos , it works for me on several network related issues on M1 chip macbook)
Try this command:
gem install cocoapods --source http://rubygems.org
I am working on a Mac, M1 chip. I was working in React Native, when something happened with my system's configurations while trying to get the Android Build to work. No npm, npx, (any node commands really) worked, I couldn't do anything with my Pods, and essentially just everything was broken. I deleted and uninstalled everything to do with Node, Java, and Cocoapods but the issue I'm facing now is that I cannot install CocoaPods
I am following the directions from here and I am on my third try to just start a new React App. The Project will build, but I cannot install any pods and the whole app seems to not know that its supposed to be running off React as it won't let me use imported components.
So I have a plethora of issues in front of me, but the biggest is my inability to install CocoaPods.
I run...
brew install CocoaPods
and get the following return...
Warning: cocoapods 1.11.3 is already installed and up-to-date.
But upon running npx react-native init I get the following error...
error Error: Failed to install CocoaPods dependencies for iOS project, which is required by this template.
So I tried as I was instructed, and attempted to run...
sudo arch -x86_64 gem install ffi
Which gives me this...
make install failed, exit code 2
And since that fails, I cannot successfully run...
arch -x86_64 pod install
So it looks like my code is breaking before I can even type a single line. I've been trying to just create a new React Project for hours now... this seems very overly complicated
Update your ruby to recent version, for that you can use rbenv via homebrew. After that install cocoapods via gem install
There must have been some sort of corruption or only partially installed dependency. I ended up wiping my hard drive and restoring everything, it worked after that
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 removed cocoa pods because it claimed it had installed, but kept saying the command pod wasn't found afterward. When trying to reinstall cocoapods (sudo gem install cocoa pods -v) I get this error:
ERROR: While executing gem ... (Errno::EPERM)
Operation not permitted - /usr/bin/pod
Any ideas?
As it has been pointed out below by Ramesh Ramchandaran, this is a cleaner way of doing it, instead of getting around the Security features of OS X.
sudo gem install -n /usr/local/bin cocoapods
Original Answer
I'm assuming you're running OS X 10.11.
This is happening because Apple has enabled rootless on the new install.
If you type:
sudo nvram boot-args="rootless=0"; sudo reboot
in terminal.app, your computer will reboot with it disabled.
Once that is done, type:
sudo gem install cocoapods -V
the -V is for verbose and will spit out any errors if they happen.
As rootless does not affect /usr/local/bin, the following succeeds:
sudo gem install -n /usr/local/bin cocoapods
Any caveats?
Using home-brew or custom $GEM_HOME can help resolving the issue.
I did clean installation of ruby with brew:
brew install ruby
Now the gem stuff seem to happen relative to my /usr/local/bin*, which is exactly what I needed.
I recommend installing all your gems into your .gem folder in your home folder to avoid using sudo or a ruby version manager as other people suggest.
All you have to do is update your .bash_profile by adding these 2 lines. (Don‘t forget to restart your terminal after applying these changes)
export GEM_HOME=~/.gem
export PATH="$GEM_HOME/bin:$PATH"
After updgrading from Yosemite to El Capitan ( 10.11.4), I kept getting the below error message while trying to 'reinstall' Cocoapods ( after trying out pretty much all the solutions under different Stackoverflow threads and the Cocoapods issue-page itself, for the same issue)
"Could not find a valid gem 'cocoapods' (>= 0) in any repository"
However, quit terminal, restarted system, created new Xcode project from the scratch and then when i did 'pod install', it worked.
Note: I was trying to use Alamofire and SwiftyJson cocoapods
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.