With this tutorial, you can get an ipa file directly which can be installed on any one’s iphone or itouch for testing.


1.      In your Xcode project expand the Targets item and control-click ( or right click if using a multi button mouse ) and select Add->New Target and select “Other” at the bottom left and choose the Aggregate option similar to this:


2.     And name the new target IPA:


ps. Helloworld is your original Xcode project.

3.    On the next screen be sure the add HelloWord target as a direct dependency by clicking the plus button in the lower right corner under the Direct Dependencies section like this:


4.    Close this window once you are done adding HelloWorld target as a direct dependency of IPA target. Right click or control-click on the IPA target and select the Add->New Build Phase->New Run Script Build Phase menu item and add the following code:

# compress application.

/bin/rm -rf “$payload_dir”
/bin/mkdir “$payload_dir”
/bin/cp -R “$app_bundle_dir” “$payload_dir”
/bin/cp iTunesArtwork “$CONFIGURATION_BUILD_DIR/iTunesArtwork”
/usr/bin/zip -r “${PROJECT_NAME}.ipa” Payload iTunesArtwork
rm -rf “$payload_dir” iTunesArtwork

payload_dir=”$CONFIGURATION_BUILD_DIR/Payload”app_bundle_dir=”$CONFIGURATION_BUILD_DIR/${PROJECT_NAME}.app”/bin/rm -rf “$payload_dir”/bin/mkdir “$payload_dir”/bin/cp -R “$app_bundle_dir” “$payload_dir”/bin/cp iTunesArtwork “$CONFIGURATION_BUILD_DIR/iTunesArtwork”cd “$CONFIGURATION_BUILD_DIR”/usr/bin/zip -r “${PROJECT_NAME}.ipa” Payload iTunesArtworkrm -rf “$payload_dir” iTunesArtwork

The run script window should look like this:

ps. iTunesArtwork(do not change this) is the name of your image file(512 × 512 jpg) which will appear on itunes when you sync the app.

5.    Now you can choose to run the IPA target instead of the HelloWorld target to compile the application and turn it into HelloWorld.ipa file that your users can bring directly into iTunes simply by double clicking on it.


In the directory where you apps are built, you should find a file called HelloWorld.ipa:


This also works on lastest iphone OS version 3.1.3