“ POD Update”不更新到最新版本

问题描述 投票:0回答:7

我在项目中使用的是我的podfile:

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'

问题是Cocoapods 0.39将AFNETWORKing更新为2.5.4版,这是错误的。最新版本为2.6.3,Facebook SDK更新为4.4(最新IS 4.8)等。 我试图删除PODS文件夹和.lock文件,但无济于事

也试图清洁可可脚架的缓存,但无济于事:

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.

	
ios cocoapods afnetworking-2
7个回答
26
投票
改变

platform :ios, '8.0'

platform :ios, '10.0'



更新正常。
    

Cocoapods不会拿起最新版本的POD的原因之一可能是需要较早版本的另一个依赖性。

,例如,假设最新版本的poda是2.6,您在豆荚中有一个:

13
投票
pod 'PodA', '~> 2.0' pod 'PodB'

对您来说,PODB具有以下依赖性: “ poda”:“〜> 2.5.4”

当Cocoapods试图满足依赖项时,它将拒绝PODA的2.6版,因为它无法满足对PODB的更强依赖性约束。
对此进行故障排除的一种方法是要求Cocoapods通过在运行“ POD UPDATE”
之前设置以下环境变量来打印内部依赖图图形调试信息

export MOLINILLO_DEBUG=1

安装最新的Cocoapods为我工作。

sudo gem install cocoapods
    

6
投票
我尝试了一个新的豆荚,这给了我最新的

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.
trory清除可可录的缓存
您可以从下面找到如何找到

0
投票

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



Hope它有帮助:)

将PODS缓存在路径以下,然后再次安装POD。
〜/library/caches/cocoapods/

/.cocoapods/repos/ibm-cocoapods-specs

在我的案子中,我尝试了很多事情,但没有任何措施。我的项目已经足够大,最低iOS版本也被贬低了。然后,我将项目更新为Xcode上的最低iOS支持版本“

15.6

0
投票

platform :ios, '15.6'

注:

15.6

为我的情况工作。始终检查最低iOS支持版本。


0
投票

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.

$ podUpdate

在终端类型此命令中,调用所有pod to to new版本

plapease更新您的Cocoapods,如下所示:

myComputer:desiredFolder Test$ pod update

-1
投票

最新问题
© www.soinside.com 2019 - 2025. All rights reserved.