"pod update" doesn't update to latest version
Asked Answered
D

8

23

Here is my podfile I use in the project:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '9.0'
use_frameworks!

pod 'AFNetworking', '~> 2.0'
pod 'GoogleMaps'
pod 'MONActivityIndicatorView'
pod 'NYXImagesKit'
pod 'MagicalRecord'
pod 'FBSDKCoreKit'
pod 'FBSDKShareKit'
pod 'FBSDKLoginKit'
pod 'Countly'

The problem is that cocoapods 0.39 is updating AFNetworking to version 2.5.4 which is wrong. The latest version is 2.6.3 Also facebook SDK updating to 4.4 (latest is 4.8) etc.

I tried to delete Pods folder and .lock file but doesn't help

Also tried to clean the cocoapods cache but didn't help:

MACMINI:myproject myusername$ pod cache clean --all
MACMINI:myproject myusername$ pod update
Update all pods
Updating local specs repositories
Analyzing dependencies
Downloading dependencies
Installing AFNetworking (2.5.4)
Installing Bolts (1.2.0)
Installing Countly (15.06.01)
Installing FBSDKCoreKit (4.4.0)
Installing FBSDKLoginKit (4.4.0)
Installing FBSDKShareKit (4.4.0)
Installing GoogleMaps (1.10.1)
Installing MONActivityIndicatorView (0.0.3)
Installing MagicalRecord (2.3.0)
Installing NYXImagesKit (2.3)
Generating Pods project
Integrating client project

[!] Please close any current Xcode sessions and use `myproject.xcworkspace` for this project from now on.
Sending stats
Sending stats
Pod installation complete! There are 9 dependencies from the Podfile and 10 total pods installed.
Daliadalila answered 24/11, 2015 at 12:21 Comment(4)
is your cocoa pods up to date?Urba
yes. I updated cocoapods to version 0.39.0 as described aboveDaliadalila
Maybe try to remove , '~> 2.0' from AFNetworking line? and remove force-use of frameworks?Pawnshop
Make sure the podspec version info is correct, and that version points to the correct tagCindycine
D
-1

Removing and reinstalling of cocoapods solved the problem:

MACMINI:myproject myusername$ sudo rm -fr ~/.cocoapods/repos/master
Password:
MACMINI:myproject myusername$ pod setup
Setting up CocoaPods master repo
Setup completed
MACMINI:myproject myusername$ cd ~/myproject/
MACMINI:myproject myusername$ pod update
Update all pods
Updating local specs repositories
Analyzing dependencies
Downloading dependencies
Installing AFNetworking 2.6.3 (was 2.5.4)
Installing Bolts 1.5.0 (was 1.2.0)
Using Countly (15.06.01)
Installing FBSDKCoreKit 4.8.0 (was 4.4.0)
Installing FBSDKLoginKit 4.8.0 (was 4.4.0)
Installing FBSDKShareKit 4.8.0 (was 4.4.0)
Installing GoogleMaps 1.10.5 (was 1.10.1)
Using MONActivityIndicatorView (0.0.3)
Using MagicalRecord (2.3.0)
Using NYXImagesKit (2.3)
Generating Pods project
Integrating client project
Sending stats
Sending stats
Pod installation complete! There are 9 dependencies from the Podfile and 10 total pods installed.
Daliadalila answered 24/11, 2015 at 15:6 Comment(2)
This solution is overkill. The problem is likely a dependency within the Podfile that must be upgraded first.Rift
Not working for meLimitation
B
24

In my case, Neon wouldn't update for me. It turns out it was because of the deployment target.

Changed platform :ios, '8.0' to platform :ios, '10.0'

And update worked normally.

Bohannan answered 5/6, 2017 at 15:40 Comment(2)
Correct answer. I searched a lot, tried using several methods and this guy saved my time finally.Unhitch
this is perfect solution! thanks BojacobProsciutto
P
13

One of the reasons CocoaPods won't pick up the latest version of the pod could be another dependency that required an earlier version.

For example, suppose the latest version of PodA is 2.6 and you have this in your Podfile:

pod 'PodA', '~> 2.0'
pod 'PodB'

Unbeknown to you, PodB has the following dependency: "PodA": "~> 2.5.4"

When CocoaPods tries to satisfy the dependencies, it will reject version 2.6 of PodA because it fails to satisfy the stronger dependency constraint on PodB.

One way to troubleshoot this is to ask CocoaPods to print the internal dependency graph debugging information by setting the following environment variable prior to running "pod update"

export MOLINILLO_DEBUG=1
Paraclete answered 29/5, 2017 at 18:23 Comment(1)
For anyone stuck here figuring out which dep it is, try forcing one of the Pods to its latest version, such as pod 'Firebase/Firestore', '> 8.6.0' and running pod update. If it's unable to satisfy the dep using your version it should tell you which pod caused that. In my case it was FirebaseFirestoreSwift wanting a super old version of Firestore. I fixed it by hardcoding it to the latest beta pod 'FirebaseFirestoreSwift', '8.6.0-beta'Julissajulita
P
6

Installing latest cocoapods worked for me.

sudo gem install cocoapods
Paleethnology answered 31/10, 2019 at 12:55 Comment(0)
U
0

I tried a new pod and it get me the latest

Update all pods
Updating local specs repositories
Analyzing dependencies
Downloading dependencies
Installing AFNetworking (2.6.3)
Generating Pods project
Integrating client project

[!] Please close any current Xcode sessions and use `AfnetworkingPodFic.xcworkspace` for this project from now on.
Sending stats
Pod installation complete! There is 1 dependency from the Podfile and 1 total pod installed.

Try clearing the cache of Cocoapods

you can find how to from below

https://gist.github.com/mbinna/4202236

Hope it helps :)

Urba answered 24/11, 2015 at 13:5 Comment(3)
Didn't help me. Updated topicDaliadalila
@Sergio I am getting the latest one see my updated answerUrba
@Sergio try deleting the files too as mentioned in the link aboveUrba
T
0

Clean the pods cache in below paths and do pod install again.

~/Library/Caches/CocoaPods/

~/.cocoapods/repos/ibm-cocoapods-specs

Titmouse answered 22/6, 2017 at 6:34 Comment(0)
D
-1

Removing and reinstalling of cocoapods solved the problem:

MACMINI:myproject myusername$ sudo rm -fr ~/.cocoapods/repos/master
Password:
MACMINI:myproject myusername$ pod setup
Setting up CocoaPods master repo
Setup completed
MACMINI:myproject myusername$ cd ~/myproject/
MACMINI:myproject myusername$ pod update
Update all pods
Updating local specs repositories
Analyzing dependencies
Downloading dependencies
Installing AFNetworking 2.6.3 (was 2.5.4)
Installing Bolts 1.5.0 (was 1.2.0)
Using Countly (15.06.01)
Installing FBSDKCoreKit 4.8.0 (was 4.4.0)
Installing FBSDKLoginKit 4.8.0 (was 4.4.0)
Installing FBSDKShareKit 4.8.0 (was 4.4.0)
Installing GoogleMaps 1.10.5 (was 1.10.1)
Using MONActivityIndicatorView (0.0.3)
Using MagicalRecord (2.3.0)
Using NYXImagesKit (2.3)
Generating Pods project
Integrating client project
Sending stats
Sending stats
Pod installation complete! There are 9 dependencies from the Podfile and 10 total pods installed.
Daliadalila answered 24/11, 2015 at 15:6 Comment(2)
This solution is overkill. The problem is likely a dependency within the Podfile that must be upgraded first.Rift
Not working for meLimitation
T
-1

$ pod update

in terminal type this command, call update all pod to new version

Tumultuous answered 12/6, 2017 at 5:20 Comment(1)
Its not working for meLimitation
P
-3

Please update your CocoaPods like below:

myComputer:desiredFolder Test$ pod update
Phenobarbitone answered 14/5, 2018 at 13:7 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.