Difference between revisions of "IPA File Format"

From The iPhone Wiki
Jump to: navigation, search
m (Introductory tweaks.)
m (removing duplicate content I forgot to remove...)
Line 18: Line 18:
 
# Build application
 
# Build application
 
# Locate the <code>.app</code> folder
 
# Locate the <code>.app</code> folder
  +
Create a root folder, inside this folder create another folder called 'Payload' and place your application in here. Next, create a 512x512 image for your icon, call it iTunesArtwork and place it in the root folder. Create an [[iTunesMetadata.plist]] file and place it in the root folder as well. ZIP the contents of the root folder and not the root folder itself, i.e. select the items inside the root folder and '''not''' the root folder itself. Use the following ZIP command to properly create IPA files;
Apple uses the IPA format for [[iOS]] applications in iTunes. Developers use the IPA format typically for Ad Hoc Distribution of apps to beta testers, IPAs can be created through [[Xcode]]. This requires an Apple Developer or Enterprise account if you want to distribute to non-[[Jailbreak|jailbroken]] devices.
 
 
== How to create ==
 
IPAs can be created either by hand or through [[Xcode|Xcode's]] Product -> Archive (this requires an App Developer or Enterprise account) and can later be viewed through Organizer -> Archives. To create an IPA hand, build your application and locate the .app file for it. Create a root folder, inside this folder create another folder called 'Payload' and place your application in here. Next, create a 512x512 image for your icon, call it iTunesArtwork and place it in the root folder. Create an [[iTunesMetadata.plist]] file and place it in the root folder as well. ZIP the contents of the root folder and not the root folder itself, i.e. select the items inside the root folder and '''not''' the root folder itself. Use the following ZIP command to properly create IPA files;
 
 
zip -u -y -r -n .jpg:.JPG:.jpeg:.png:.PNG:.gif:.GIF:.Z:.gz:.zip:.zoo:.arc:.lzh:.rar:.arj:.mp3:.mp4:.m4a:.m4v:.ogg:.ogv:.avi:.flac:.aac ''IPAFileName.ipa'' ''./*''
 
zip -u -y -r -n .jpg:.JPG:.jpeg:.png:.PNG:.gif:.GIF:.Z:.gz:.zip:.zoo:.arc:.lzh:.rar:.arj:.mp3:.mp4:.m4a:.m4v:.ogg:.ogv:.avi:.flac:.aac ''IPAFileName.ipa'' ''./*''

Revision as of 23:56, 21 March 2013

IPA file icon from iTunes 11.

A IPA archive is the de facto way to package applications for iOS. The name has no official definition, but is commonly called iPhone Application by the iOS community. The file is just a renamed ZIP archive. Although any computer with a ZIP archive reader can extract an IPA, PNG images (e.g. the app's icon files) are typically in a proprietary variant of the PNG format instead of the standardized PNG format, and the application binary is encrypted with DRM which hinders the ability to examine the binary.

Contents

As an IPA file is just a renamed ZIP archive, its structure is available from PKWARE.

Usage

Apple uses the IPA format for packaging iOS aplications. iTunes can be used to install their contents on a device, provided the included files are signed. Developers can use the IPA format for Ad Hoc Distribution of their apps.

Creation

IPA files are typically created through Xcode, but may be created manually:

  1. Build application
  2. Locate the .app folder

Create a root folder, inside this folder create another folder called 'Payload' and place your application in here. Next, create a 512x512 image for your icon, call it iTunesArtwork and place it in the root folder. Create an iTunesMetadata.plist file and place it in the root folder as well. ZIP the contents of the root folder and not the root folder itself, i.e. select the items inside the root folder and not the root folder itself. Use the following ZIP command to properly create IPA files;

zip -u -y -r -n .jpg:.JPG:.jpeg:.png:.PNG:.gif:.GIF:.Z:.gz:.zip:.zoo:.arc:.lzh:.rar:.arj:.mp3:.mp4:.m4a:.m4v:.ogg:.ogv:.avi:.flac:.aac IPAFileName.ipa ./*