I recently added CocoaPods to my app in order to use Google Analytics. The app runs fine, but unit tests no longer build. I get the following error when trying to run unit tests:
我最近将CocoaPods添加到了我的应用中,以便使用Google Analytics。该应用程序运行正常,但单元测试不再构建。尝试运行单元测试时出现以下错误:
ld: framework not found GGLAnalytics for architecture x86_64
Here is my Podfile:
这是我的Podfile:
target 'MyApp' do
use_frameworks!
pod 'Google/Analytics'
target 'MyAppTests' do
inherit! :search_paths
# Pods for testing
end
target 'MyAppUITests' do
inherit! :search_paths
# Pods for testing
end
end
I tried putting pod 'Google/Analytics'
within the test targets, then ran pod install
and pod update
, cleaned the build, deleted derived data, nothing helped. Still getting the same error.
我尝试将pod“Google / Analytics”放入测试目标中,然后运行pod install和pod update,清理构建,删除派生数据,没有任何帮助。仍然得到同样的错误。
1 个解决方案
#1
2
This problem was resolved by upgrading to CocoaPods 1.2.1.beta.1 (sudo gem install cocoapods --pre
) and re-running pod install
.
通过升级到CocoaPods 1.2.1.beta.1(sudo gem install cocoapods --pre)并重新运行pod install来解决此问题。
#1
2
This problem was resolved by upgrading to CocoaPods 1.2.1.beta.1 (sudo gem install cocoapods --pre
) and re-running pod install
.
通过升级到CocoaPods 1.2.1.beta.1(sudo gem install cocoapods --pre)并重新运行pod install来解决此问题。