0
我試圖從0.39遷移到CocoaPods的最新版本。這是我原來的podfile:用WatchKit Extension遷移到CocoaPods 1.1.1
platform :ios, '10.0'
use_frameworks!
target 'MyApp' do
pod 'SwiftyJSON'
pod 'Alamofire', '~> 4.0'
pod 'AlamofireImage', '~> 3.1'
end
target 'MyAppWatchKitApp' do
end
target 'MyAppWatchKitApp Extension' do
end
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '3.0'
end
end
end
閱讀CocoaPods 1.0 Migration Guide和this StackOverflow post我試圖更新我的podfile後:
platform :ios, '10.0'
target 'MyApp' do
use_frameworks!
pod 'SwiftyJSON'
pod 'Alamofire', '~> 4.0'
pod 'AlamofireImage', '~> 3.1'
target 'MyAppWatchKitApp' do
end
target 'MyAppWatchKitApp Extension' do
end
end
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '3.0'
end
end
end
保存podfile,在終端運行pod update
,然後打開和建設項目,我看以下錯誤(客戶端名稱審查,以 「MyApp的」 符合以上的POD文件替換):
其他的事情我已經試過:
- 除了做一個
pod install
到pod update
- 刪除派生數據
我與斯威夫特和Xcode的,但莢一些好的經驗都還比較新對我來說。也許我錯過了一些非常基本的東西。任何幫助是極大的讚賞!
謝謝您的迴應。我把你的代碼立即放在podfile的'config.build_settings ['SWIFT_VERSION'] ='3.0''行後,然後運行'pod install'和'pod update',清理並構建我的項目,但仍然看到相同的錯誤。 –