iphone – 无法从命令行构建XCode项目,但可以从XCode构建

前端之家收集整理的这篇文章主要介绍了iphone – 无法从命令行构建XCode项目,但可以从XCode构建前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我在XCode中创建了一个简单的基于导航的iPhone应用程序。该应用程序从XCode下构建并正常运行,但我无法从命令行构建该应用程序。

从终端我执行:

xcodebuild -project George.xcodeproj -alltargets -parallelizeTargets -configuration Debug build

但我得到这个错误

=== BUILD NATIVE TARGET George OF PROJECT George WITH CONFIGURATION Debug ===
Check dependencies
[BEROR]Code Sign error: The identity 'iPhone Developer' doesn't match any valid certificate/private key pair in the default keychain

** BUILD Failed **


The following build commands Failed:
    Check dependencies
(1 failure)

我试图处理它的方式有什么问题吗?

解决方法

除了解锁钥匙串之外,您还可以指定代码标识(或将其设置在目标中)。开发证书采用“iPhone开发商:公司”形式,分发证书如“iPhone Distribution:Company Inc”。

xcodebuild -project George.xcodeproj -alltargets -parallelizeTargets -configuration Debug build CODE_SIGN_IDENTITY='iPhone Developer: Company Inc'

猜你在找的Xcode相关文章