Cocoapods と Xcode 7 beta 6 で問題が発生しました: 3 つの異なるテスト ターゲット (テスト、UITests、IntegrationTests) を持つプロジェクトがあります。私のポッドは最初のターゲット (「テスト」) で問題なく動作しているように見えますが、他のターゲットには問題があります。
- 後者の 2 つのターゲットで Cocoapod のいずれも参照しなければ、すべてが正常にビルドされます。
- ただし、ポッドの 1 つ (この場合は XCGLogger) を使用しようとすると、リンカー エラーが発生します。
- ビルド フェーズを確認したところ、
Embed Pods Frameworks
両方のターゲットに欠落していることが判明したため、手動で追加しました。 - これを実行してクリーンアップし、派生データを削除しても、問題はまだ存在します。
リンカ エラーを示すスクリーンショットが添付されています。これも、後者の 2 つのターゲットで XCGLogger を使用しようとした場合にのみ発生します。最初のターゲットでは問題なく動作します。
徹底的にするために...これが私が使用しているPodfileです:
platform :ios, "8.0"
use_frameworks!
target 'Glimpulse' do
pod "SwiftSpinner", :git => 'https://github.com/zbeckman/SwiftSpinner.git'
pod 'XCGLogger', :git => 'https://github.com/DaveWoodCom/XCGLogger.git', :branch => 'swift_2.0'
pod 'GRValidation', '~> 0.2'
end
target 'GlimpulseTests' do
pod "SwiftSpinner", :git => 'https://github.com/zbeckman/SwiftSpinner.git'
pod 'XCGLogger', :git => 'https://github.com/DaveWoodCom/XCGLogger.git', :branch => 'swift_2.0'
pod "Nimble", :git => 'https://github.com/Quick/Nimble.git', :branch => 'swift-2.0'
pod "Quick", :git => 'https://github.com/zbeckman/Quick.git', :branch => 'swift-2.0'
pod 'GRValidation', '~> 0.2'
# pod "SwiftCheck", :git => 'https://github.com/zbeckman/SwiftCheck.git', :branch => 'swift-develop'
end
target 'GlimpulseUITests' do
pod "SwiftSpinner", :git => 'https://github.com/zbeckman/SwiftSpinner.git'
pod 'XCGLogger', :git => 'https://github.com/DaveWoodCom/XCGLogger.git', :branch => 'swift_2.0'
pod "Nimble", :git => 'https://github.com/Quick/Nimble.git', :branch => 'swift-2.0'
pod "Quick", :git => 'https://github.com/zbeckman/Quick.git', :branch => 'swift-2.0'
pod 'GRValidation', '~> 0.2'
# pod "SwiftCheck", :git => 'https://github.com/zbeckman/SwiftCheck.git', :branch => 'swift-develop'
end
target 'GlimpulseIntegrationTests' do
pod "SwiftSpinner", :git => 'https://github.com/zbeckman/SwiftSpinner.git'
pod 'XCGLogger', :git => 'https://github.com/DaveWoodCom/XCGLogger.git', :branch => 'swift_2.0'
pod "Nimble", :git => 'https://github.com/Quick/Nimble.git', :branch => 'swift-2.0'
pod "Quick", :git => 'https://github.com/zbeckman/Quick.git', :branch => 'swift-2.0'
pod 'GRValidation', '~> 0.2'
# pod "SwiftCheck", :git => 'https://github.com/zbeckman/SwiftCheck.git', :branch => 'swift-develop'
end
link_with 'GlimpulseUITests'
link_with 'GlimpulseIntegrationTests'