“pod update”不会更新到最新版本
这是我在项目中使用的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(最新版本为4.8)等。
我试图删除Pods文件夹和.lock文件,但没有帮助
还试图清理cocoapods缓存但没有帮助:
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.
就我而言,霓虹灯不会为我更新。 事实certificate这是因为部署目标。
改变platform :ios, '8.0'
到platform :ios, '10.0'
并且更新工作正常。
CocoaPods无法获取最新版本的pod的原因之一可能是需要早期版本的另一个依赖项。
例如,假设PodA的最新版本是2.6,并且您在Podfile中有这个:
pod 'PodA', '~> 2.0' pod 'PodB'
你不知道,PodB有以下依赖:“PodA”:“〜> 2.5.4”
当CocoaPods试图满足依赖关系时,它将拒绝PodA的2.6版本,因为它无法满足PodB上更强的依赖性约束。
解决此问题的一种方法是通过在运行“pod update”之前设置以下环境变量,让CocoaPods打印内部依赖关系图调试信息
export MOLINILLO_DEBUG=1
我尝试了一个新的pod,它让我得到了最新的
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.
尝试清除Cocoapods的缓存
你可以从下面找到如何
希望能帮助到你 :)
$ pod更新
在终端类型这个命令中,调用update all pod到新版本
清理以下路径中的pod缓存并再次执行pod安装。
〜/图书馆/缓存/的CocoaPods /
〜/ .cocoapods /回购/ IBM-的CocoaPods-规格
请更新您的CocoaPods,如下所示:
myComputer:desiredFolder Test$ pod update
删除和重新安装cocoapods解决了这个问题:
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.
- :发送到实例0x6d21350的无法识别的select器
- iOS应用程序在安装后在设备上testing多久才能继续运行?
- iOS:从后台线程创buildUIImage?
- 在iOS中的UITextView不显示笑脸(表情符号)?
- 自定义ViewController转换不能正确resize
- 检查touchend是否在拖动之后
- 在第一个视图控制器中添加'addObserver'(NSNotificationCenter),在第二个
- 录制,在iOS中使用运行MPMoviePlayerController的HTTP Livevideostream快照
- 如何使用NSURLIsExcludedFromBackupKey或kCFURLIsExcludedFromBackupKey?