Xcode:我可以从命令行设置代码签名配置文件吗
我有一个批量构建脚本,运行它可以将 iOS 应用程序的通用代码库构建为 100 多个独特的 IPA。我在 OS X Lion 上使用 Xcode 4.2。 每个应用程序的构建设置都是使用 PlistBuddy 设置的,构建工作通过运行 PlistBuddy,安装应用程序图标,运行 xcodebuild,然后运行 xcrun。它已经过测试并且 当定位单个应用程序时可以正常工作。
每个应用程序都有一个独特的分发配置文件,当前必须通过 Xcode 的项目设置 -> 手动分配该配置文件。代码签名部分(用于发布版本)。
我的问题是构建脚本在 xcodebuild 阶段无法将应用程序与其配置文件匹配。它只会尝试使用最新的应用程序配置文件,然后生成错误: [BEROR]代码签名错误:找不到配置文件“最新应用程序的配置配置文件 ID ”。
拼命寻找一种方法来通过命令行(安全、plistbuddy 或 xcodebuild?)进行设置。如果没有它,我的批处理脚本就毫无用处。
I have a batch build script that I run to build a common codebase for iOS apps into 100+ unique IPAs. I use Xcode 4.2 on OS X Lion.
The build settings for each app are set using PlistBuddy and the build works by running
PlistBuddy, installing app icons, running xcodebuild, then xcrun. It has been tested and
works correctly when targeting a single app.
Each app has a unique distribution provisioning profile that currently must be manually assigned via Xcode's Project settings -> Code Signing section (for release builds).
My problem is that the build script will not be able to match the App to its profile during the xcodebuild phase. It will simply try to use the most recent app's profile, then generate the error:
[BEROR]Code Sign error: Provisioning profile 'MOST RECENT APP'S PROVISIONING PROFILE ID HERE' can't be found.
Desperately looking for a way to either set this via command line (security, plistbuddy, or xcodebuild?). My batch script is quite useless without it.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我找到了答案——很简单。问题是在我的 Xcode 目标代码签名设置中,我为构建设置了特定的分发配置文件(大约 90 个)。
解决这个问题的方法是简单地选择“自动配置文件选择”下的配置文件。
完成后,xcodebuild 就可以成功运行了。
I found the answer - it was simple. The problem was that in my Xcode target Code Signing settings, I had set a specific distribution profile for the build (out of 90 or so).
What fixed it was simply selecting the profile under "Automatic Profile selection".
Once that was done, xcodebuild was able to run successfully.