2011-12-06 79 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