Creare un file IPA per iPhone/iPod Touch

iPhone, MacOSX Soft! Commenta l'articolo

Ecco la lista dei passi da fare per creare un file .ipa:

What you need:
1: An app
2: A patched MobileInstallation file installed on your iPhone or iPod Touch. 
3: Lastly, you need to know that when I say "ProgName", substitute the name of the program you're working with 
Getting the iTunesArtwork file
The iTunesArtwork file is simply a jpeg image with the extension taken off, and is included in application's install folder on your device for every app downloaded from the app store. This image is what appears in the Applications section of iTunes as the icon for the app, and is definitely nice to have -- if you don't have it, you get a generic, black icon that no one wants to see. If you have the iTunesArtwork file, skip all this and go down to the next red headline! Otherwise, read on:
1: Open iTunes on your computer and find your application in the iTunes Music Store. On the application's page, find the app icon at the top-left corner of the page and right-click it. Now choose "Copy iTunes Store URL". Your clipboard now contains something like this:
Code:
http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=284962368&mt=8
2: Paste that somewhere (in your browser or a text editor) and replace the section that says
Code:
phobos.apple.com
with this:
Code:
ax.phobos.apple.com.edgesuite.net
Go to the resulting URL in your browser.

3: Do a search on that page for the text:
Code:
100x100-75
Safari users will have to right-click the page and select "View Source" before searching for the above text.
Once the text is found, copy the entire URL it's in to your clipboard. For example, this is the URL I ended up with:
Code:
http://a1.phobos.apple.com/us/r30/Purple/fe/c1/bc/mzl.gpjkgpje.100x100-75.jpg
4: Paste the URL from the last step into your browser again, but change the "100x100" to "512x512". The image that loads will be the official, Apple-provided iTunesArtwork file. Save this to your desktop.
5: Rename the file to "iTunesArtwork" with NO extension. Note that doing this from the GUI on Mac will simply hide the extension, not remove it. If this is the case, open Terminal (found in /Applications/Utilities) and paste this line into it:
Code:
mv ~/Desktop/iTunesArtwork.jpg ~/Desktop/iTunesArtwork
Mac and Linux users should then execute this line in Terminal to apply the appropriate permissions to the file:
Code:
chmod 665 ~/Desktop/iTunesArtwork
Windows users will need to enable the "Show known file extensions" option in their folder options in order to remove the extension properly.
6: Pat yourself on the back! You've just gotten your iTunesArtwork file.
Bundling the .IPA
1: Create a folder on your desktop called "working". Open that, and create another folder inside of it called "Payload". Case-sensitive.
2: Move your iTunesArtwork file into the "working" folder, and your .app into the Payload folder.
3: Mac and Linux users only: Open Terminal and run the following command:
Code:
chmod -R 775 ~/Desktop/working/Payload
4: Go into your ProgName.app folder within Payload (Mac users, right-click ProgName.app and choose Show Package Contents).
5 (For Mac users with Dev Tools installed ONLY): Double-click the Info.plist file. The Property List Editor will open and show a simple table. Click the last row of the table, then press the + button that appears to create a new row at the bottom. In the first new cell enter
Code:
SignerIdentity
and in the second new cell, enter
Code:
Apple iPhone OS Application Signing
Save this file.
5 (For Windows, Linux, and other Macs): Visit the following site: https://brokolice.drsny.net/iphone/plutil/ (You may have to Approve the security certificate -- don't worry, it's safe)
Browse for your Info.plist file, and press the "Convert" button. Save the resulting file to your computer. Windows users, open this file in WordPad. Mac and Linux users can use any text editor.
scroll to the bottom of the file and make a new line just before
Code:

And paste the following in that spot:
Code:
SignerIdentity
Apple iPhone OS Application Signing
The end of the file should now look like this:
Code:
SignerIdentity
Apple iPhone OS Application Signing


Save the file (Make sure the name is Info.plist -- case sensitive!) and replace the Info.plist in ProgName.app with it.
6: Time to zip it up. Use your favorite method to zip the iTunesArtwork file and Payload folder together in one .zip file. Mac users can select both, right-click, and choose "Compress 2 Items". Windows users can select both, right-click, and choose "Add to Archive" (remember to select ZIP, not RAR if that option is available).
If you unzip the file, you should see this structure:
Code:

iTunesArtwork
+Payload
AppName.app
7: Rename the zip file to ProgName.ipa
8: All done! Congratulations!

Scrivi un Commento

Home | Graffiti e Disegni | Educazione | Chi siamo | Blog | Progetti | Contatti
RSS Feed Comments RSS Accedi