nhgrif
nhgrif

Reputation: 62072

Error when running pod install

When I run the pod install command, I am getting the following error:

[!] The `master` repo requires CocoaPods 1.0.0 -  (currently using 0.39.0)
Update Cocoapods, or checkout the appropriate tag in the repo.

Updating is not an option for me currently.

I looked at the answers to this question but none of the solutions seemed to work for me.

How can I continue to use CocoaPods 0.39.0 for my dependency management?

Upvotes: 11

Views: 10839

Answers (5)

Vijay Chalke
Vijay Chalke

Reputation: 1

note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description

Could not build the application for the simulator. Error launching application on iPhone 11 Pro.

If this error Occur

Add this below Code in your podfile

post_install do |installer| installer.pods_project.targets.each do |target| flutter_additional_ios_build_settings(target) target.build_configurations.each do |config| config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '9.0' end end end

Then Also Change Deployment Target to 9.0 in

(Your Project) > ios > Flutter > Flutter.podsec

And Finally it worked

Upvotes: 0

AnshulSharma
AnshulSharma

Reputation: 41

At first In Podfile replace source "https://github.com/CocoaPods/Specs" with "source "https://github.com/CocoaPods/Old-Specs"

Move to your workspace root folder by below command :

cd <path to your workspace>

Pod install

If it doesn't work well then try above steps after following below steps.

In Terminal follow these steps :

gem list --local | grep cocoapods

You see output similar to this:

cocoapods (0.27.1, 0.20.2)
cocoapods-core (0.27.1, 0.20.2)
cocoapods-downloader (0.2.0, 0.1.2)

now for a safer side delete all local pods using below command :

sudo gem uninstall cocoapods
sudo gem uninstall cocoapods-core
sudo gem uninstall cocoapods-downloader

safer side delete cocoa pods version 0.39.0

sudo gem uninstall cocoapods -v 0.39.0

reinstall cocoa pods version 0.39.0

sudo gem install cocoapods -v 0.39.0

Then run below commands in terminal :

cd <path to your workspace>
pod install (this time it would fail again, but that's fine)
cd ~/.cocoapods/repos
git clone https://github.com/CocoaPods/Specs.git
cd specs
git checkout v0.32.1

Move to your workspace root folder by below command :

cd <path to your workspace>

run below commands :

rm -rf Pods
rm -rf Podfile.lock
pod install (this time you should be able to see it working)

Upvotes: 4

Swati Gupta
Swati Gupta

Reputation: 364

Write following command in terminal

sudo gem install -n /usr/local/bin cocoapods

Upvotes: 4

ChenSmile
ChenSmile

Reputation: 3441

Hi I tried above all answers, But nothing got working, Finally I tried these Steps in Terminal.

1- Open Terminal
2- cd < Your Project File Location>
3- sudo gem install cocoapods --pre
4- pod setup
5- touch podfile
6- pod install

Upvotes: 1

kpsharp
kpsharp

Reputation: 455

Cocoapods had an issue with rate limiting back in March and implemented sharding to avoid this problem in the future. There's a blog post here about it.

To fix this, you can either update to a 1.x version of Cocoapods or add the new source to the top of your Podfile:

source "https://github.com/CocoaPods/Old-Specs"

You probably will need to replace the other source line.


If you continue having issues, it's likely because a specific pod does not have a spec accessible in the source you're now using. I ran into this issue with the Apptentive SDK. You can specify the source for an individual library in your Podfile likeso:

pod 'apptentive-ios', :git => 'https://github.com/apptentive/apptentive-ios.git', :tag => 'v3.0.0'

Simply update :git and :tag with the correct values.

For a Github project, it may be easiest to go through the Releases page of whatever library you're looking at to find the tag you want for a specific version.

Upvotes: 10

Related Questions