【发布时间】:2014-06-01 22:10:55
【问题描述】:
我正在尝试让 xcodebuild 与 CocoaPods 项目一起工作,但遇到了问题。我在跑步:
xcodebuild -workspace 'MyWorkspace.xcworkspace' -scheme DefaultScheme -configuration Release CODE_SIGN_IDENTITY="Distribution Profile" PRODUCT_NAME="MyProduct"
我收到以下错误:
The following build commands failed:
Libtool /Users/myuser/repos/MyProjectDir/Build/Intermediates/Pods.build/Release-iphoneos/Pods.build/Objects-normal/armv7s/libsupport.a normal armv7s
Libtool /Users/myuser/repos/MyProjectDir/Build/Intermediates/Pods.build/Release-iphoneos/Pods.build/Objects-normal/arm64/libsupport.a normal arm64
Libtool /Users/myuser/repos/MyProjectDir/Build/Intermediates/Pods.build/Release-iphoneos/Pods.build/Objects-normal/armv7/libsupport.a normal armv7
构建在 xcode 中运行良好。我已经用谷歌搜索死了,还没有找到解决方案。有人有什么想法吗?
编辑:对于每个 pod,我还得到如下两行。
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: can't locate file for: -lPods-AFNetworking
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: -lPods-AFNetworking is not an object file (not allowed in a library)
第二次编辑:如果我省略 PRODUCT_NAME 参数,它会完美运行。这是怎么回事?
【问题讨论】:
标签: objective-c xcode5 cocoapods xcodebuild libtool