我試圖將我們現有的CocoaPod配置從0.39.0遷移到1.0.1。遷移到CocoaPods 1.0.1
我們現有的Podfile
樣子:
platform :ios, '9.0'
use_frameworks!
target 'Tools' do
pod 'zipzap', '~> 8.0.4'
pod 'Argo', '~> 2.2.0'
pod 'Curry', :git => 'https://github.com/thoughtbot/Curry.git', :commit => 'eeb459fac309833288e61e134a4e8fad649e99b0'
end
target 'ToolsTests' do
end
這編譯和測試跑就好了前面。 After following the migration guide.我重新調整了Podfile
像這樣:
platform :ios, '9.0'
target 'Tools' do
use_frameworks!
pod 'zipzap', '~> 8.0.4'
pod 'Argo', '~> 2.2.0'
pod 'Curry', :git => 'https://github.com/thoughtbot/Curry.git', :commit => 'eeb459fac309833288e61e134a4e8fad649e99b0'
target 'ToolsTests' do
inherit! :search_paths
end
end
這將編譯和鏈接就好了。不幸的是,測試運行時,他們與崩潰:
2016-06-07 12:04:06.265 xctest[56474:789900] The bundle 「ToolsTests」 couldn’t be loaded because it is damaged or missing necessary resources. Try reinstalling the bundle.
2016-06-07 12:04:06.299 xctest[56474:789900] (dlopen_preflight($HOME/Library/Developer/Xcode/DerivedData/Tools-dbmncsubtoarlhhcrpchrswefprz/Build/Intermediates/CodeCoverage/Products/Debug-iphonesimulator/ToolsTests.xctest/ToolsTests): Library not loaded: @rpath/Argo.framework/Argo
Referenced from: $HOME/Library/Developer/Xcode/DerivedData/Tools-dbmncsubtoarlhhcrpchrswefprz/Build/Intermediates/CodeCoverage/Products/Debug-iphonesimulator/ToolsTests.xctest/ToolsTests
Reason: image not found)
Program ended with exit code: 82
在遷移指南,它說:
我們收到的bug報告很大一部分是由於Podfile歧義。它給了很大的自由來創建各種可以用實現細節運行的CocoaPods設置,或者工作,但比他們需要的複雜得多。
這是過去的「實施細節運氣」工作的這種情況之一嗎?如果不是什麼正確的Podfile
語法?
我應該注意,如果我在ToolsTests
中複製pod
defs,那麼一切正常。雖然這感覺錯了。