由于使用
Xcode 8将我们的代码库迁移到
Swift 3,我们无法让我们的单元测试运行.该应用程序为商店编译和存档很好,但是当我们尝试运行测试时,它无法构建抱怨:
框架找不到架构x86_64的GoogleMapsBase
我已经检查了我们的podfile,根据最新文档,一切似乎都已正确设置.
编辑:下面的Podfile
source 'https://github.com/CocoaPods/Specs.git'
target "Borked" do
platform :ios, '9.3'
use_frameworks!
pod 'GoogleMaps'
pod 'GoogleAnalytics'
target "Unit Tests" do
inherit! :search_paths
end
target "UI Tests" do
inherit! :search_paths
end
end
最佳答案 像这样的东西应该工作!
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '9.3'
use_frameworks!
target 'MyApp' do
pod 'GoogleMaps'
pod 'GoogleAnalytics'
target "Unit Tests" do
inherit! :search_paths
end
target "UI Tests" do
inherit! :search_paths
end
end
或这个
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '9.3'
use_frameworks!
target 'MyApp' do
target 'MyExtension' do
pod 'GoogleMaps'
pod 'GoogleAnalytics'
target "Unit Tests" do
inherit! :search_paths
end
target "UI Tests" do
inherit! :search_paths
end
end
end