2015-11-24 24 views
8

Đây là podfile tôi tôi sử dụng trong dự án:"pod cập nhật" không cập nhật lên phiên bản mới nhất

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' 

Vấn đề là cocoapods 0,39 được cập nhật lên phiên bản 2.5.4 AFNetworking đó là sai. Phiên bản mới nhất là 2.6.3 Cũng facebook SDK cập nhật đến 4.4 (mới nhất là 4.8) vv

Tôi cố gắng để xóa Pods thư mục và tập tin .lock nhưng không giúp

Cũng đã cố gắng để làm sạch bộ nhớ cache cocoapods nhưng không giúp:

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. 
+0

là vỏ cacao của bạn đến nay? – vinbhai4u

+0

có. Tôi cập nhật cocoapods lên phiên bản 0.39.0 như mô tả ở trên – Sergio

+0

Có thể thử xóa, '~> 2.0' khỏi dòng AFNetworking? và loại bỏ việc sử dụng các khung công tác? – DisableR

Trả lời

-1

Loại bỏ và cài đặt lại của cocoapods giải quyết vấn đề:

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. 
+0

trong trường hợp của tôi admob không cập nhật mới nhất – Jamil

+0

Giải pháp này là quá mức cần thiết. Vấn đề có thể là sự phụ thuộc trong Podfile phải được nâng cấp trước tiên. – davidgoli

0

tôi đã thử một pod mới và nó làm cho tôi mới nhất

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. 

Hãy thử xoá bộ nhớ cache của Cocoapods

bạn có thể tìm cách từ bên dưới

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

Hy vọng nó sẽ giúp :)

+1

Không giúp tôi. Cập nhật chủ đề – Sergio

+0

@Sergio Tôi nhận được câu trả lời mới nhất của tôi – vinbhai4u

+0

@Sergio thử xóa các tệp quá như đã đề cập trong liên kết ở trên – vinbhai4u

2

Một trong lý do CocoaPods sẽ không nhận phiên bản mới nhất của nhóm có thể là một phiên bản khác dency yêu cầu một phiên bản trước đó.

Ví dụ, giả sử các phiên bản mới nhất của Poda là 2,6 và bạn có điều này trong Podfile của bạn:

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

không ai biết đến bạn, PodB có sự phụ thuộc như sau: "Poda": "~> 2.5. 4 "

Khi CocoaPods cố gắng đáp ứng các phụ thuộc, nó sẽ từ chối phiên bản 2.6 của PodA vì nó không đáp ứng ràng buộc phụ thuộc mạnh hơn trên PodB.

Một cách để khắc phục sự cố này là yêu cầu CocoaPods để in đồ thị phụ thuộc nội bộ thông tin gỡ lỗi bằng cách thiết lập các biến môi trường sau đây trước khi chạy "cập nhật pod"

export MOLINILLO_DEBUG=1 
4

Trong trường hợp của tôi, Neon sẽ không cập nhật cho tôi. Hóa ra đó là vì mục tiêu triển khai.

Changed platform :ios, '8.0' để platform :ios, '10.0'

Và cập nhật làm việc bình thường.

0

$ pod cập nhật

trong loại thiết bị đầu cuối lệnh này, gọi cập nhật tất cả pod lên phiên bản mới

0

sạch vỏ bộ nhớ cache trong bên dưới đường dẫn và làm pod cài đặt lại.

~/Library/Caches/CocoaPods/

~/.cocoapods/Repos/ibm-cocoapods-thông số kỹ thuật

Các vấn đề liên quan