2011-12-06 78 views
1

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

问题:

1.Is可以开发其他应用程序(Mac OSX版),使IPA其正在设置文件的输入,我的代码(IOS)和书籍,然后编译终于给输出提供代码的.ipa文件?

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

如果有可能,请给我一些想法,使其成为现实,你的建议也更重要。对此感谢各位。

从其他IPA文件生成IPA

我跟着你的方法,但任何一个可以请让我知道,我创建了一个IPA文件,现在我想修改IPA的内容,并且还新问题配置文件有可能吗?

+0

考虑使用詹金斯(以前称为哈德森)。 – Till

+0

同意Till,使用Testflight或Hockeyapp http://www.hockeyapp.net/你也可以得到实时崩溃报告。 – 0x8badf00d

回答

2

如果您使用较早的置备配置文件创建了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 
+0

如果您所做的只是将设备添加到您的AdHoc配置文件中,则实际上不会退出该应用程序。应用程序本身不保留允许的设备列表。您只需在“新”设备上安装新版本的配置文件,然后安装应用程序本身即可。 – Till

+1

我认为应用程序内部的配置文件会保存它可以安装的设备列表。当列表得到更新时,新的配置文件替换旧配置文件,所以应用程序需要再次进行代码签名是我的想法。纠正我,如果我错了。 – 0x8badf00d

+0

感谢您的快速响应,我尝试按照@ 0x8badf00d.we执行该过程,即使对于不同的配置文件也是如此。 – ajay