我在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'