26

I developed one application for iPhone. After I build I got .app file in build folder. My application name is Myapp, then i got Myapp.app file in the build folder.

My problem is i want to create the .ipa file. how is that.. it is for to install jailbraked iPhone..

0

6 Answers 6

66
  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)

6
  • 3
    Strange, but the folder must be named "Payload", nothing else will work, once you have compressed the file you can name it whatever you want.
    – user160917
    Commented Apr 30, 2010 at 1:49
  • Yes, I thought that was strange as well. Commented Apr 30, 2010 at 16:29
  • 1
    Thanks for this! I ve been going crazy trying to figure this part out! Commented Mar 25, 2011 at 19:33
  • When I install an ipa which was constructed this way, I find that its icon (on my iPhone) remains grey forever. Trying to run the app on my iPhone does nothing but change the text beneath the icon to 'Installing...' despite the fact that the app ran fine on the simulator in Xcode and iTunes conveyed that it had installed the app successfully. Anyone else experience this? Does running an app like this require jailbreaking?
    – Jellicle
    Commented Aug 30, 2015 at 2:58
  • Still works on 2018, and even though I've spent so much time building dev archives, doing that took literally seconds.
    – SudoPlz
    Commented Mar 21, 2018 at 20:20
15

Run Script

/bin/sh

mkdir $CONFIGURATION_BUILD_DIR/Payload
cp -R $CONFIGURATION_BUILD_DIR/$PRODUCT_NAME.app $CONFIGURATION_BUILD_DIR/Payload
cp $CONFIGURATION_BUILD_DIR/$PRODUCT_NAME.app/iTunesArtwork $CONFIGURATION_BUILD_DIR
cd $CONFIGURATION_BUILD_DIR
/usr/bin/zip -r $PRODUCT_NAME.ipa Payload iTunesArtwork
rm -rf Payload iTunesArtwork
exit 0
12

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.

2
  • Manually creating the .ipa file gave error but using the Archives tab it worked perfectly fine. Thanks
    – user427969
    Commented Jan 9, 2013 at 5:21
  • In xcode 4.5 and later in Organizer window in xcode press Distribute button, then choose Save for Enterprise or Ad-Hoc Deployment - then you will be able to generate ipa file. Commented Oct 10, 2013 at 16:11
7

Signing Part:

This part is required for non-jailbroken phone and rest of the steps are same

  1. Open Terminal and enter the following commands

codesign -f -s "Code signing certificate name" appNamewithextension

example
codesign -f -s "iPhone Developer: Durai Amuthan" sample.app

  1. Verify it is signed using the following command

codesign -verify AbsolutePath_with_app_name

ipa creation Part:

Way 1:

1.Create a folder named Payload and copy the .app into it

2.compress it and you'll get Payload.zip

3.Now Change the extension from zip to ipa that's it

mkdir Payload
cp -R MyAppName.app Payload/
zip -r -s 64 Payload.zip Payload/
mv Payload.zip MyAppName.ipa

Way 2:

Drag and drop the .app in iTunes that'll create the iPa for you

Installation part:

  • If you had Tried the Way 1 in previous step then Drag and drop the .ipa in iTunes

  • Choose the device in iTunes and click install and apply the sync that's it

3

Follow the following steps

  • Upload your app file as a zip on www.diawi.com

  • Open the diawi url in your web browser.

  • You will find download application option there. Download the file and it will be downloaded as an IPA.
2
  • Keeping in mind that the free account can only upload apps until 75mb
    – SudoPlz
    Commented Mar 21, 2018 at 20:19
  • This is not how to create an ipa for iOS, but just how to distribute an ipa. Commented May 21, 2018 at 1:30
0

Also, if you want to include the logo file, add the icon to the directory and name it "iTunesArtwork". compress that along with the Payload directory that has the .app file in it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.