Google Cocoapods Not Installing - ios

Whenever I try to install any of Google's cocoapods I get one of two errors.
Either:
$ pod install
Analyzing dependencies
[!] The version of CocoaPods used to generate the lockfile (0.38.0.beta.2) is higher than the version of the current executable (0.37.2). Incompatibility issues may arise.
CocoaPods 0.38.0.beta.2 is available.
To update use: `gem install cocoapods --pre`
[!] This is a test version we'd love you to try.
For more information see http://blog.cocoapods.org
and the CHANGELOG for this version http://git.io/BaH8pQ.
Downloading dependencies
Installing Google (1.0.7)
[!] Error installing Google
...
inflating: /var/folders/<myDirectory>/Samples/signin/SignInExampleSwift/ViewController.swift
warning [/var/folders/<myDirectory>/file.zip]: 375 extra bytes at beginning or within zipfile
(attempting to process anyway)
Or:
$ pod install
[in /Users/<user>/Desktop/FakeProject]
Analyzing dependencies
CocoaPods 0.38.0.beta.2 is available.
To update use: `gem install cocoapods --pre`
[!] This is a test version we'd love you to try.
For more information see http://blog.cocoapods.org
and the CHANGELOG for this version http://git.io/BaH8pQ.
Downloading dependencies
Installing AppInvites (1.0.1)
[!] Error installing AppInvites
[!] /usr/bin/tar xfz /var/folders/<myDirectory>/file.tgz -C /var/folders/<myDirectory>
tar: Unrecognized archive format
tar: Error exit delayed from previous errors.
I've been trying this with both new and existing objective-c projects and have tried uninstalling and re-installing cocoapods. Not really sure what the issue seems to be and Google doesn't have any troubleshooting for their cocoapods.

Try updating your gem
sudo gem update -n /usr/local/bin cocoapods
pod install

Deleting podfile.lock and pod install fixed it for me.

I had the same issue and I did gem install cocoapods first then pod install worked fine.

After 6 hours i found this
go to http://cocoapods.org/ and download tar file

Related

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

Cocoapods behaving awkwardly [duplicate]

I'm having some issues installing Alamofire 4.0 into my project.
I've got the latest version of Xcode, running Swift 3, and when I try to install alamofire I'm getting like 800 compiler errors.
Apparently
CocoaPods 1.1.0+ is required to build Alamofire 4.0.0+
[!] some_cocoapod requires CocoaPods version >= X.Y.Z, which is not satisfied by your current version, Z.Y.X.
I looked at the version of CocoaPods I have in terminal and it says I'm at 1.0.1.
Running an update didn't work I guess because CocoaPods 1.1 is in beta.
So I'm not exactly sure how to update it up to where I'm good to go.
Unless being out of date doesn't force like 800 compiler errors? Does that sound like some other issue?
Execute the following on your terminal to get the latest stable version:
sudo gem install cocoapods
Add --pre to get the latest pre release:
sudo gem install cocoapods --pre
If you originally installed the cocoapods gem using sudo, you should use that command again.
Later on, when you're actively using CocoaPods by installing pods, you will be notified when new versions become available with a CocoaPods X.X.X is now available, please update message.
Open the Terminal -> copy below command
sudo gem install cocoapods
It will install the latest stable version of cocoapods.
after that, you need to update pod using below command
pod setup
You can check pod version using below command
pod --version
If you got System Integrity Protection enabled or any other permission write error, which is enabled by default since macOS Sierra release, you should update CocoaPods, running this line in terminal:
sudo gem install cocoapods -n/usr/local/bin
After installing, check your pod version:
pod --version
You will get rid of this error:
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /usr/bin directory
And it will install latest CocoaPods:
Successfully installed cocoapods-x.x.x
Parsing documentation for cocoapods-x.x.x
Installing ri documentation for cocoapods-x.x.x
Done installing documentation for cocoapods after 4 seconds
1 gem installed
If you are using Homebrew, open terminal and type:
brew upgrade cocoapods
If that does not work, try:
brew install cocoapods
After that, run:
brew link --overwrite cocoapods
For those with a sudo-less CocoaPods installation (i.e., you do not want to grant RubyGems admin privileges), you don't need the sudo command to update your CocoaPods installation at all:
gem install cocoapods
You can find out where the CocoaPods gem is installed with:
gem which cocoapods
If this is within your home directory, you should definitely run gem install cocoapods without using sudo.
Finally, to check which CocoaPods you are currently running type:
pod --version
I had to do this, was stuck on 1.9.1 on macOS
sudo gem install -n /usr/local/bin cocoapods
Below are steps to update cocoapods :
Open terminal (Shortcut : Press cmd + space tab to open Spotlight then text in terminal)
Use command sudo gem install cocoapods. This will ask for system password due to security concern thereafter it installs gems
Now, set up pod using pod setup command. This will setup cocoapods master repo.
You can check the version of cocoapods using pod --version command.
Non of the above solved my problem, you can check pod version using two commands:
pod --version
gem which cocoapods
In my case pod --version always showed "1.5.0" while gem which cocopods shows
Library/Ruby/Gems/2.3.0/gems/cocoapods-1.9.0/lib/cocoapods.rb. I tried every thing but unable to update version showed from pod --version. sudo gem install cocopods result in installing latest version but pod --version always showing previous version. Finally I tried these commands:
sudo gem update
sudo gem uninstall cocoapods
sudo gem install cocoapods
pod setup``pod install
The catch for me was sudo gem update. Hopefully it will help any body else.
You can solve this problem by these Commands:
First:
sudo gem install cocoapods
Desp: type user mac password now your cocoapods will be replace with a stable version.
You can find out where the CocoaPods gem is installed with:
gem which cocoapods
if you have cloned the repo then type this command:
pod repo update
close your xcode and run this command
Pod install
This is a really quick & detailed solution
Open the Terminal and execute the following to get the latest stable version:
sudo gem install cocoapods
Add --pre to get the latest pre release:
sudo gem install cocoapods --pre
Incase any error occured
Try uninstall and install again:
sudo gem uninstall cocoapods
sudo gem install cocoapods
Run after updating CocoaPods
sudo gem clean cocoapods
After updating CocoaPods, also need to update Podfile.lock file in your project.
Go to your project directory
pod install
Very Smoot and Easy Solution
//MARK: -Latest stable version:
sudo gem install cocoapods --pre
//MARK: -If not work then
sudo gem install cocoapods --pre -n /usr/local/bin
//MARK: - if upper command not works you can use below mention command as well!
brew install cocoapods
brew upgrade cocoapods
brew link cocoapods
If this
sudo gem install cocoapods
gives you this error:
Could not find a valid gem 'cocoapods' (>= 0) in any repository
Try this:
sudo gem install cocoapods --source http://rubygems.org
I tried updating and it didn't work. Finally , I had to completely remove (manually )cocoapods, cocoapods-core , cocoapods-try.. and any other package used by cocoapods. Use this terminal command to list all the packages:
gem list --local | grep cocoapods
After that , I also deleted ./cocoapods folder from the user's root folder.
After trying all the steps above, with nothing working, I ran bundle update which seems to have done the trick for me.
Refer this link https://guides.cocoapods.org/using/getting-started.html
brew install cocoapods
brew upgrade cocoapods
brew link cocoapods
I have the problem in myproject when pod version and gem which cocoapods always return difference version.
All I had to do is remove Gemfile.lock in my project and bundle install again. It removed the locked cocoapods version and install a newer one.
Hope that helps some one here.
On my M1 Mac, I had a separate version of Homebrew installed for the Silicon/Arm64 side.
brew upgrade cocoapods was defaulting to a rosetta install of homebrew. I kept running it, and couldn't figure out why cocoapods was not updating. So I had to run it in a way that targets the M1 side of things instead of Rosetta.
I had previously aliased the Arm brew to mbrew. So I had to run mbrew upgrade cocoapods
If you updated sudo gem install cocoapods but it's still showing the old version you just need to type bundle update in your terminal to update the bundle and pod --version will show the newest version you installed
write on your terminal this:
sudo gem install cocoapods --pre
for update the gem of cocoapods to lastest version
First check cocoapods versionlike
pod --version
then update like
sudo gem install cocoapods --pre
after update you can also check cocoapods version.
I change the line "pod 'Alamofire', '~> 4.0'" to "pod 'Alamofire', :git => 'https://github.com/Alamofire/Alamofire', :commit => '3cc5b4e'" after that in terminal: "pod install --repo-update" and it works.

SwiftSoup cocoapods install only and only version 1.4, not 1.5

I tried to install swiftSoup to parse HTML to my xCode project but unfortunately version of swiftSoup installed by command expressed in official site
is 1.4 which is unacceptable to work with swift 4.0. I found out that version of swiftSoup compatible with xCode 9 and swift 4.0 is swiftSoup ver.1.5.2 but I does not installs by command i tried from official site( even more i tried to mention version in a pod file and threw me an error.
How can I install the latest version if swiftSoup by cocoapods?
platform :ios, ’11.0’
This line indicate that what is your pod deployment target so it will install compatible pod with above platform sometime it's happened that after upgrade your project developer forgot to change this target that why sometime old pod install every time. So always change here if you changed the deployment target of your project.
put pod 'SwiftSoup', '~> 1.4' in your pod file and run pod install command and maybe it will help you to get 1.4 version of SwiftSoup
Finally I succeeded to install swiftSoup ver.1.5.8 after a lot of struggling. In general I needed to install classic ancient version of swiftSoup as described in official site (pod 'SwiftSoup') and with big help of Chirag Shah I got to know that I need to mention my target which is iOS 11 (remove hash sign and does this match with current deployment target) and I need to update my old-world pod by pod update command. Thats it. But there was a problem when I inserted command pod update I got and error:
Updating spec repo `master`[!]
Failed to connect to GitHub to update the CocoaPods/Specs specs repo - Please check if you are offline, or that GitHub is down
So first I needed to resolve this problem with the big help of this link. I found out that I needed update openssl, then ruby, then cocoapod.
Here is copy of steps I took:
1.8.5-p52
1.8.5-p113
1.8.5-p114
1.8.5-p115
1.8.5-p231
1.8.6
:
2.5.0-rc1
2.5.0
2.6.0-dev
:
$ rbenv install 2.5.0
$ rbenv versions
* system (set by /Users/username/.rbenv/version)
2.5.0
$ ruby --version
ruby 2.0.0p648 (2015-12-16 revision 53162) [universal.x86_64-darwin16]
$ rbenv global 2.5.0
$ rbenv versions
system
* 2.5.0 (set by /Users/username/.rbenv/version)
$ ruby --version
ruby 2.5.0p0 (2017-12-25 revision 61468) [x86_64-darwin16]
$ gem install cocoapods -n /usr/local/bin
$ which pod
/usr/local/bin/pod
$ pod --version
1.4.0
And then I can return to my project where I uninstalled my old pod and mention target ios 11:
platform :ios, ’11.0’
and eventually insert pod update command then cocopods will update my pod without any error =))

The version of CocoaPods used to generate the lockfile (1.5.3) is higher than the version of the current executable (1.5.2)

on $pod install it gives warning & fails
The version of CocoaPods used to generate the lockfile (1.5.3) is higher than the version of the current executable (1.5.2)
What is it trying to say ?
macOs : 10.11.6 osx el capitan
my pod version is : 1.5.3
What does"current executable" (1.5.2) means ?
and
how to update it ?
The error you are getting is due to your podfile.lock being built with an older version of Cocoapods. All you need to do is to delete your podfile.lock file and run pod install. This will create a new podfile.lock, with your current dependencies. Note that it should not take too long because your files should already be downloaded, they just need to be linked in said file.
3 solution
deleted ios/podfile.lock and again do $pod install
OR
OS UPDATE
2.1 updated mac to high sierra or higher
2.2 update xcode
2.3 then update pod $sudo gem install cocoapods
2.4 then $cd ios
2.5 then $pod install
OR
do any thing to make version match, then only it will work
For those like me whose cocoapods version is 1.5.2, you can update cocoapods using
sudo gem install cocoapods
and the problem is solved
For checking pod version use
pod --version
For those for which cocoapods version is 1.5.3, you can delete podfile.lock and do pod install. However please note that if the version, of libraries used in your project, is not specified in podfile, then they will be automatically updated to latest vesrion.
$ [sudo] gem install cocoapods
you can update with this command
If you have tried the above methods and it doesn't work, then try this way:
gem update --system
$ sudo gem install cocoapods
you can solve

How to add cocoa pods to this project?

I got an error after installing this pod.
I successfully got that original app to work after bringing it to my desktop and installing pods.
The problem is that after trying it with the real app I want to merge it with, after running pod install and opening the .xcodeworkspace project; I get 1 warning saying the file is already open or something like that.
My question: Should one run pod install in the same place where my original .xcodeproj is located or somewhere else? How do I install this pod to my own application without an error? When I open workspace I see the title of my app and under it 4 pods with a question mark and one compiler warning.
WTL2:~ Apple$ cd desktop
WTL2:desktop Apple$ cd myapp
WTL2:myapp Apple$ touch podfile
WTL2:myapp Apple$ open -a TextEdit Podfile
WTL2:myapp Apple$ pod install
Analyzing dependencies
CocoaPods 0.36.0.beta.2 is available.
To update use: `gem install cocoapods --pre`
[!] This is a test version we'd love you to try.
For more information see http://blog.cocoapods.org
and the CHANGELOG for this version http://git.io/BaH8pQ.
Downloading dependencies
Installing FXBlurView (1.6.3)
Installing HexColors (2.2.1)
Installing MessageBanner (1.0.3)
Generating Pods project
Integrating client project
[!] From now on use `myapp.xcworkspace`.
WTL2:faunna Apple$
The specific Xcode warning is:
couldn't load myapp because it is already open from another project or workspace

Resources