[英]Apple Mach-O Linker Error when using CocoaPods with Xcode
I am trying to add PFAnalytics ( instructions here ). 我正在尝试添加PFAnalytics( 此处的说明 )。 Below is my PodFile.
以下是我的PodFile。 I just hit
pod install
and tried to compile and run, and I see the errors below: 我只是点击
pod install
并尝试编译和运行,我看到了以下错误:
pod file
: pod file
:
# Uncomment this line to define a global platform for your project
platform :ios, ‘8.0’
target 'ShitTalk' do
pod ‘Parse’
end
target 'ShitTalkTests' do
end
I tried to add Google Analytics too and I see the same error so I think if I try with ANY library with Cocoapods, it's going to do this. 我也尝试添加Google Analytics(分析),但遇到了同样的错误,因此我认为,如果我尝试使用带有Cocoapods的任何库,都可以做到这一点。
You must use the .xcworkspace
file after pod install
instead of .xcodeproj
file. 在
pod install
后必须使用 .xcworkspace
文件,而不是.xcodeproj
文件。
The xcworkspace
contains your project
and your pods
. xcworkspace
包含您的project
和pods
。
After that you should be able to run normally. 之后,您应该可以正常运行。
Try these two solutions 尝试这两种解决方案
Remove the library .a
file from the ProjectTarget->Build Phase
从
ProjectTarget->Build Phase
删除库.a
文件
Open the workspace .xcworkspace
instead of opening the .xcodeproj
打开工作区
.xcworkspace
而不是打开.xcodeproj
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.