iPhone / iOS:构建一次,签名两次

发布于 2024-10-04 06:07:32 字数 186 浏览 0 评论 0原文

有没有办法为测试人员提供将上传到 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

放我走吧 2024-10-11 06:07:32

您可以自己运行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 like codesign -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).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文