2014-10-12 32 views
4

我今天(sudo gem install cocoapods)更新的CocoaPods。執行pod install之後,該項目將不再編譯。看起來這個吊艙的頭文件不再被該項目找到。頭更新的CocoaPods後都沒有發現

難道最近可可豆莢版(S)什麼變化?

以下是我的POD文件:

source 'https://github.com/artsy/Specs.git' 
source 'https://github.com/CocoaPods/Specs.git' 

platform :ios, '7.0' 

inhibit_all_warnings! 

pod 'CocoaLumberjack' 
pod 'RestKit', '~> 0.20.0' 
pod 'RestKit/Testing' 
pod 'NLTHTTPStubServer' 
pod 'Appsee' 

pod 'google-plus-ios-sdk', '1.7.0' 
+0

假設你是在0.34.2版本。 'pod install'後會得到什麼錯誤信息? – raurora 2014-10-12 03:45:56

+0

起初,我得到了以下錯誤:[!]使用隱式源已被棄用。要繼續使用所有的當前機器上的來源,添加以下到您的Podfile的頂部: 源「https://github.com/CocoaPods/Specs.git」。 – 2014-10-12 03:47:44

+0

請看我更新的答案。希望它適用於你:) – raurora 2014-10-12 05:09:53

回答

3

修復簡單的錯誤告訴做什麼。添加到您的Podfile的頂部:

source 'https://github.com/artsy/Specs.git' 
source 'https://github.com/CocoaPods/Specs.git' 

這裏是Github的問題更多的細節 - https://github.com/CocoaPods/CocoaPods/issues/2515

更新

確保在您的Xcode項目的根目錄下創建Podfile 。這是你的Podfile應該是什麼樣子 -

source 'https://github.com/artsy/Specs.git' 
source 'https://github.com/CocoaPods/Specs.git' 

platform :ios, '7.0' 
inhibit_all_warnings! 

# Pods 
pod 'RestKit', :head 
pod 'RestKit/Testing', :head 
pod 'CocoaLumberjack', :head 
pod 'NLTHTTPStubServer', :head 
pod 'Appsee', '~> 2.1' 
pod 'google-plus-ios-sdk', '~> 1.7.0' 

在你的終端 -

  • 更新的RubyGems - sudo gem update
  • 更新可可豆莢 - sudo gem install cocoapods

在你的項目目錄 -

  • 卸下吊艙 - rm -rf Pods/
  • 安裝豆莢 - pod install
+0

它沒有解決這個問題 - 標題仍然無法找到。例如 - #import「RKRelationshipMapping.h」。 – 2014-10-12 04:00:59

+0

@ErikSapir我可以問你正在使用的所有豆莢嗎? – raurora 2014-10-12 04:02:08

+0

我將我的podfile內容添加到主消息 – 2014-10-12 04:06:51

0

我是在同一個位置,你,最後決定回滾CocoaPods版本我已經安裝了(這解決了我的問題)

幸運我的Podfile.lock文件處於版本控制之下,所以我拔出了該文件以查看我使用的最後一個版本的Cocoapods。我Podfile.lock最後一行是:

COCOAPODS: 0.33.1 

因此,這裏是我如何解決問題

sudo gem uninstall cocoapods 

sudo gem install cocoapods -v 0.33.1 

rm -rf Pods 

pod install 
+1

PS:關於將你的'Pods'目錄放在版本控制下一直存在爭議。這是你爲什麼應該的一個很好的例子。 – 2014-10-27 07:14:48