如何对自动生成的 iOS 应用程序进行协同设计?

发布于 2024-11-05 09:10:38 字数 626 浏览 3 评论 0 原文

您好,

我正在编写一个 Web 服务器脚本,该脚本可让您创建自定义 iOS 应用程序(基本上是交换徽标和其他一些内容)。 Web 服务器定制先前上传的“shell”.ipa 并重新压缩整个容器以将其发送到用户的浏览器。即:我们在Web服务器上定制一个之前上传的.ipa,让用户下载并提交到App Store。

下一步将是重新设计整个 .ipa - 因为我们更改了 .IPA 内容并且用户必须使用他自己的签名身份 - 以便他实际上可以将其上传到 App Store。

据我了解,有一个“CodeResources”文件,其中包含捆绑包中每个资源文件的某种哈希值,并且可执行文件也包含某种嵌入式签名。要生成这些,您必须在用户计算机上使用“codesign”实用程序,然后使用应用程序加载器将其提交到应用程序商店。到目前为止正确吗?

我想找出的是:

  1. 是否有一种方法可以在服务器上共同设计 .ipa (让用户事先上传他的证书),这样他就不需要做任何额外的工作?
  2. 如果 1) 不可能,是否有某种工具可以轻松地重新设计 .ipa? Xcode 似乎需要一些项目设置工作来完成一些代码签名 - 如果可能的话。
  3. 是否有其他方法可以为用户共同设计 .ipa 文件 - 可能无需手动完成?

提前致谢!

Greetings,

I'm in the progress of writing a web server script that lets you create custom iOS apps (basically exchanging logos and a few other things). The web server customizes a previously uploaded "shell" .ipa and re-zips the whole container to send it to the user's browser. That is: we customize a previously uploaded .ipa on the web server and let the user download it for submission to the App Store.

The next step would be to re-codesign the whole .ipa - because we changed the .IPA contents and the user must use his own signing identity - so that he can actually upload it to the App Store.

From what I understand, there is a "CodeResources" file which contains some kind of hash for each resource file in the bundle, and the executable contains some kind of embedded signature as well. To generate these, you'd have to use the "codesign" utility on the user's computer, then use Application Loader to submit it to the App Store. Correct so far?

What I'm trying to find out is:

  1. Is there a way to codesign the .ipa on the server (with having the user upload his certificate beforehand), so that he does not have any extra work to do?
  2. If 1) is not possible, is there some kind of tool that allows to re-codesign the .ipa without much hassle? Xcode seems to require some project setup work to do just a bit of code signing - if possible at all.
  3. Are there any alternative ways to codesign the .ipa files for the user - possibly without having to manually do it by hand?

Thanks in advance!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(2

素罗衫 2024-11-12 09:10:38

Xcode 使用codesign 命令行实用程序创建 CodeResources 文件夹和数字签名,您可以自己调用它来对 Xcode 外部的应用程序包进行签名。如果服务器运行 Mac OS X,您可能可以在服务器上自动执行此操作;如果您真的很聪明,您也许能够弄清楚如何使用 openssl 自己创建签名(签名证书等都是标准内容)。或者,如果您可以信赖安装了开发工具的用户,请为他们提供一个自动签名的应用程序。

这是描述一些过程的博客条目(尽管用例略有不同)。

Xcode uses the codesign command line utility to create the CodeResources folder and the digital signature, you can invoke it yourself to sign an app bundle outside of Xcode. You could probably automate this on a server if the server was running Mac OS X; if you're really clever you might be able to figure out how to create the signature yourself using openssl (the signing certificates, etc. are all standard stuff). Or, if you can count on the user having the dev tools installed, provide them with an app that automates the signing for them.

Here's a blog entry describing some of the process (though the use case is a little different).

北城孤痞 2024-11-12 09:10:38

我不想回答我自己的问题,但过了这么久我想结束这个问题。

我们最终使用 Xcode 的目标和方案来简化许多不同应用程序的生成。由于我们有合理数量的应用程序变体,因此目前看来还可以。

代码签名是一团糟,苹果不断改变其背后的技术流程——所以它是一个不断变化的目标,需要大量的黑客攻击和试错工作。

I don't like to answer my own question, but I want to close this after so long.

We ended up using Xcode's targets and schemes to ease up the generation of many different apps. Since we have a reasonable number of app variants, this seems to be OK for now.

Code signing is a mess and Apple constantly changes the technical process behind it - so it's a moving target and requires a lot of hacking and trial-and-error work.

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