cordova ios cocoapods requirement not met - ios

I am trying to run build default cordova app "hello" but when do do cordova requirements the message contains the following:
Requirements check results for ios:
Apple macOS: installed darwin
Xcode: installed [object Object]
ios-deploy: not installed
ios-deploy was not found. Please download, build and install version 1.9.2 or greater from https://github.com/phonegap/ios-deploy into your path, or do 'npm install -g ios-deploy'
CocoaPods: not installed
/Library/Ruby/Gems/2.3.0/gems/claide-1.0.2/lib/claide/command.rb:439:in `help!': [!] You cannot run CocoaPods as root. (CLAide::Help)
There are a number of things I have not yet installed such as ios-deploy however cocoapods I already have yet cordova claims otherwise. I tried reinstall cocoapods via brew and got this:
➜ ~ brew install cocoapods
Warning: cocoapods 1.4.0 is already installed
I'm not sure why this is happening but I think it might have to do with the fact that I have to do all my commands using sudo, for example to list the requirements I needed to do sudo cordova requirements rather than just cordova requirements. Moreover cordova seems to mention this, in the output of requirements (see above) it says You cannot run CocoaPods as root.
Thanks for the help

Related

Cannot install Cocoapods on M1 Chip

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

can't update CocoaPods in flutter terminal from android studio

This is the full error message
Warning: CocoaPods minimum required version 1.9.0 or greater not installed. 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 upgrade see https://guides.cocoapods.org/using/getting-started.html#installation for instructions.
CocoaPods not installed or not in valid state.
Error launching application on iPhone 13.
any command which I can directly from the Android studio terminal to update CocoaPods?
Try to install with this command
brew link --overwrite cocoapods
Try to without home brew
1 - sudo gem uninstall cocoapods
2 - sudo gem install -n /usr/local/bin
3 - cocoapods pod install
so finally after waisting my whole day.
we can't update CocoaPods from very old version to new version so.
1 - sudo gem uninstall cocoapods
2-sudo gem install cocoapods:1.10.2

Flutter upgrade cocapods version

I'm trying to update my cocoapods version used by flutter. I already upgraded cocoapods by running sudo gem install cocoapods.
When I run pod --version anywhere in the terminal it returns version 1.10.1 but when I run it inside my flutter ios project (path myProject/ios) it returns version 1.9.3 and also flutter doctor tells me that cocoapods is using version 1.9.3.
I also tried running brew update and brew upgrade cocoapods as well as brew link --overwrite cocoapods.
Can anybody tell me how to align the version used inside my flutter project with the globally (?) installed cocoapods version?
After trying all of the commands in the question I also ran sudo gem update --system in my projects\ios folder which finally solved the problem.

unable to setup cocoapods. Cocoapods setup problem

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

Cordova requirements state CocoaPods not installed when it is installed

I installed CocoaPods both using the recommended method $sudo gem install cocoapods and sudo-less method with --user-install flag, but in either case when I run $sudo cordova requirements I get the same error below:
CocoaPods: not installed
/Library/Ruby/Gems/2.3.0/gems/claide-1.0.2/lib/claide/command.rb:439:in `help!': [!] You cannot run CocoaPods as root. (CLAide::Help)
I even successfully ran a CocoaPods setup before running the requirements check. I have also created a .bash_profile with the following entries:
export GEM_HOME=$HOME/.gem
export PATH=$GEM_HOME/bin:/Users/stephensmith/.gem/ruby/2.3.0/bin:$PATH
O/S is macOS mojave 10.14.1
Any suggestions on how to fix it?
Type following command in your terminal
cd ~/.cocoapods/repos
git clone https://github.com/CocoaPods/Specs.git
This will solve the problem in most of the cases, please see:
https://github.com/CocoaPods/CocoaPods/issues/5744

Resources