在Mavericks下无法将我自己的kestore与xcodebuild一起使用 [英] Can't use my own kestore with xcodebuild under Mavericks

查看:42
本文介绍了在Mavericks下无法将我自己的kestore与xcodebuild一起使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试迁移一些iOS xcode构建服务器以使用Mavericks,这对于xcode 6构建至关重要。但是,使用以前在山狮中工作的代码调用xcodebuild似乎不再起作用,结果是:

I'm trying to migrate some iOS xcode build servers to use Mavericks which is essential for xcode 6 builds. However, invoking xcodebuild with code that used to work in mountain lion just doesn't seem to work anymore and results in:

Code Sign error: No codesigning identities found: No codesigning identities 
(i.e. certificate and private key pairs) that match the provisioning profile 
specified in your build settings ("provision name") were found.

我们的构建命令非常标准,并且证书已经到位,在美洲狮上执行相同的代码工作正常(注意,我添加了换行符以提高可读性,并替换了一些私人数据,例如项目名称和配置):

Our build command is pretty standard and the certificate is in place, doing this exact same code on mountain lion "just works" (notice I added line breaks for readability and replaced some private data such as project name and provisioning):

/Applications/Xcode5.app/Contents/Developer/usr/bin/xcodebuild -project ProjectName.xcodeproj/
-alltargets -configuration Release -sdk iphoneos7.0 build 
PROVISIONING_PROFILE=XXXX-XXXXX-XXXX-XXXX-XXXXXXX CODE_SIGN_IDENTITY="iPhone Distribution: name of company (XXXXXXXX)" 
KEYCHAIN=/Users/administrator/Library/Keychains/temp.keychain OTHER_CODE_SIGN_FLAGS=--keychain /Users/administrator/Library/Keychains/temp.keychain

我有一种解决方法,可以使用已知有效证书/设置进行签名,并使用codesign工具进行替换构建完成后,但这对用户造成一些副作用,我不知道如何orkaround。据我所知,上述方法应该可行,并且可能只是缺少我不知道的xcodebuild新参数。

I have a workaround that signs with a "known working" certificate/provisioning and replaces them using the codesign tool after the build completes but that is causing some side effects to the users that I have no idea how to workaround. As far as I can tell the above should work and might just be missing a new argument to xcodebuild that I am unaware of.

推荐答案

小牛在调用时会忽略默认的钥匙串设置:

Mavericks ignores the keychain set default when invoking:

security default-keychain

最初的xcodebuild检查逻辑会忽略命令行的钥匙串参数!

And the initial xcodebuild checking logic ignores the command line keychain arguments!

以下命令:

security list-keychains

不会返回您设置的钥匙串。解决方法实际上很简单:

Won't return the keychain you set. The workaround is actually simple:

security list-keychains -s /path/to/your/keychain

然后在初始检查过程中将找到正确的证书。

And then the right certificate will be found by the initial checking process.

这篇关于在Mavericks下无法将我自己的kestore与xcodebuild一起使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆