iPhone / iOS:构建一次,签名两次
有没有办法为测试人员提供将上传到 App Store 进行测试的确切二进制文件?
基本上我想知道的是是否可以构建源代码然后对其进行两次签名:一次用于 ADHOC 分发,然后用于 App Store 分发。
我被一些缓存的图像资源烧伤了,我想知道是否可以在不使用专用构建项目的情况下防止这种情况发生。
干杯...
Is there a way to give a tester the exact binary that will be uploaded to the App Store to test?
Basically what I want to know is whether it is possible to build the source and then sign it twice: once with for ADHOC distribution and then for App Store distribution.
I got burned by some cached image assets and I want to know if I can prevent this from happening without using a dedicated build project.
Cheers...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以自己运行
codesign
。我应该花时间在博客上写一下如何在某一时刻重新签署应用程序,但在大多数情况下,您想要提取资源规则和权利,覆盖 MyApp/embedded.mobileprovision,然后执行诸如 codesign -f - 之类的操作s 'iPhone Developer' --entitlements=extracted-entitlements-file --resource-rules=extracted-resource-rules (我的语法可能略有错误)。(当然,它不是相同的“精确二进制文件”,因为embedded.mobileprovision和嵌入式签名不同。)
但是,我上次检查过,您不需要这样做。 iOS不要求安装嵌入式配置文件;它只会查找“相似”的设备(因此您可以将设备添加到配置文件中,但不必重新签署所有旧版本)。我不确定什么算作“相似”(相同的应用程序 ID、捆绑种子和权利?),但我已经能够通过安装相应的临时配置文件来运行 App Store 构建。
当您说“被某些缓存的图像资源烧毁”时,您的意思是它不是一个干净的构建吗?我强烈建议设置一个构建服务器,通过干净的结帐构建干净的构建;具体如何解决这个问题超出了本答案的范围(我们使用 Buildbot 和一堆脚本),但这似乎比提交由随机开发人员的机器生成的构建要好得多(这也意味着我可以安装随机 beta SDK不会弄乱应用程序提交)。
You can run
codesign
yourself. I should get around to blogging how to re-sign apps at one point, but for the most part, you want to extract the resource rules and entitlements, overwrite MyApp/embedded.mobileprovision and then do something likecodesign -f -s 'iPhone Developer' --entitlements=extracted-entitlements-file --resource-rules=extracted-resource-rules
(I may have the syntax slightly wrong).(Of course, it is not the same "exact binary", since embedded.mobileprovision and the embedded signature differs.)
However, last I checked, you don't need to. iOS does not require that the embedded provisioning profile is installed; it only looks for a "similar" one (so you can add a device to a profile but not have to re-sign all your old builds). I'm not sure what counts as "similar" (same app ID, bundle seed, and entitlements?), but I've been able to run an App Store build by installing the corresponding Ad Hoc provisioning profile.
When you say "burned by some cached image assets", do you mean that it wasn't a clean build? I highly recommend setting up a build server that builds clean builds from clean checkouts; exactly how you go about this is beyond the scope of this answer (we use Buildbot and a pile of scripts), but it seems a lot better than submitting builds generated by a random developer's machine (and it also means I can install random beta SDKs without messing up app submissions).