ios - 使用任何脚本创建 Ipa(从其他 ipa 创建 ipa)

标签 ios macos ipa

基本上我的项目基于书籍(pdf 和 xml 的组合)。由于某些原因,我们维护了十多个配置文件。每当出现新设备 udid 时,我们需要创建另一个配置文件(根据要求)。每次构建我都需要在我的 xcode 中放置一些配置和替换书籍,这会导致更多时间消耗。我看过很多脚本,但所有脚本都没有完全填充场景。

问题:

1.是否有可能开发另一个应用程序 (mac osx) 来制作 ipa,它接受配置文件、我的代码 (ios) 和书籍的输入,然后编译最终输出为 .ipa 文件以提供代码?

2.还有其他方法可以减少创建 ipa 的时间吗?

如果可能的话,请给我一些想法让它成为现实,你的建议在这方面也更重要。提前感谢大家。

从其他ipa文件生成ipa的新问题

我采用了您的方法,但是有人可以告诉我吗,我创建了一个 ipa 文件,现在我想修改 ipa 的内容以及配置文件是否可行?

最佳答案

如果您有一个使用旧配置文件创建的 ipa,并且代码在获取下一个配置文件之间没有更改,那么有一种方法可以做到这一点。

You can write a script from following steps:

1) Change the .ipa that you already have to .zip and extract zip contents. This would reveal Payload folder that has YourApp.app folder
2) Right click on YourApp.app folder and show package contents
3) find embedded.mobileprovision and delete it. Drag your new .mobileprovision file into this location and rename it to say embedded.mobileprovision.
4) Find and delete any _CodeSignature or CodeResources files/folders
5) From terminal delete .DS_Store files in Payload and YourApp.app folder
6) Use Codesign utility in /usr/bin/codesign to codesign your .app. Here is command for it:

codesign -f -s "iPhone Distribution: Your company Name" PathToYourApp

In your keychain utility find the certificate name that is used to create the distribution profile and match it to first argument in codesign -f -s
7) finally zip the payload to form an ipa

zip -r YourApp.ipa Payload

关于ios - 使用任何脚本创建 Ipa(从其他 ipa 创建 ipa),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8405447/

相关文章:

objective-c - 操作无法完成。没有这样的文件或目录: but the file exists

ios - 如何判断使用什么配置文件/签名证书来签署 .ipa?

iphone - 仅在归档时出现链接器错误

ios - CGGradientCreateWithColors 返回一个空指针

iOs:Swift 谷歌分析

ios - 围绕自身旋转相机

ios - 每个 Xcode 方案的权利/能力

swift - 在我的 Swift 项目中加载本地 .scpt 文件会导致错误

linux - Ultragrid RTSP 错误

iphone - 如何在运行时检查iOS4中是否存在字体