Create .ipa for iPhone Create .ipa for iPhone xcode xcode

Create .ipa for iPhone


  1. Create a folder named Payload.
  2. Copy Myapp.app (from products of your project) into the Payload directory.
  3. Right click and Compress the Payload directory.
  4. Rename the zip file to Myapp.ipa.

** Update ** This answer is very old. Use Xcode to build .ipa archives now. (Product > Archive)


Run Script

/bin/sh

mkdir $CONFIGURATION_BUILD_DIR/Payloadcp -R $CONFIGURATION_BUILD_DIR/$PRODUCT_NAME.app $CONFIGURATION_BUILD_DIR/Payloadcp $CONFIGURATION_BUILD_DIR/$PRODUCT_NAME.app/iTunesArtwork $CONFIGURATION_BUILD_DIRcd $CONFIGURATION_BUILD_DIR/usr/bin/zip -r $PRODUCT_NAME.ipa Payload iTunesArtworkrm -rf Payload iTunesArtworkexit 0


With Xcode 4, there is now a way more easy way:
In the menu bar, go to Product > Archive.

Xcode archive menu screenshot
The organizer will then open in the Archives tab, and you will be able to save an IPA using the Share… button.

If the Archive menu item is disabled, make sure you have the scheme set to iOS device and not the iPhone Simulator. You don't have to have a device plugged in, though.

I also wrote a script to do this from the command line: xcodearchive. It works similar to xcodebuild, but generates an IPA.