In Xcode 3.2.5 I use "Build And Archive" to create an IPA file. In Xcode 4 you can use "Product -> Archive" to archive an application in an .xcarchive bundle.
How can I create an .ipa file with Xcode 4?
In Xcode 3.2.5 I use "Build And Archive" to create an IPA file. In Xcode 4 you can use "Product -> Archive" to archive an application in an .xcarchive bundle.
How can I create an .ipa file with Xcode 4?
Creating an IPA is done along the same way as creating an .xcarchive: Product -> Archive. After the Archive operation completes, go to the Organizer, select your archive, select Share and in the "Select the content and options for sharing:" pane set Contents to "iOS App Store Package (.ipa) and Identity to iPhone Distribution (which should match your ad hoc/app store provisioning profile for the project).
Chances are the "iOS App Store Package (.ipa)" option may be disabled. This happens when your build produces more than a single target: say, an app and a library. All of them end up in the build products folder and Xcode gets naïvely confused about how to package them both into an .ipa file, so it merely disables the option.
A way to solve this is as follows: go through build settings for each of the targets, except the application target, and set Skip Install flag to YES. Then do the Product -> Archive tango once again and go to the Organizer to select your new archive. Now, when clicking on the Share button, the .ipa option should be enabled.
I hope this helps.
Just setting Skip Install to YES did not work for me. Hopefully this will help somebody.
I went to dependence of my project targets: Coreplot-CocoaTouch. Then went to Coreplot-CocoaTouch Targets. In its Targets opened Build Phases. Then opened Copy Headers. There I had some of headers in Public, some in Private and some in Project. Moved ALL of them to Project.
Of course, in Build Settings of Coreplot-CocoaTouch Targets checked that Skip Install was set to YES in Deployment options.
And this time Archive made an archive that could be signed and .ipa produced.
For Xcode 4.6 (and Xcode 5) archives
Drag the application into iTunes Apps folder
Right-click on the application in iTunes Apps, select Show in Finder
.ipa
is there!I had this same problem, using an old version of the route-me library. I "skipped" all the libraries, and the libraries inside of libraries (proj4), but I still had the same problem. Turns out that route-me and proj4 were installing public header files, even when the libraries were being skipped, which was messing it up in the same way! So I just went into the route-me and proj4 targets "Build Phases" tab, opened "Copy Headers", opened "Public", and dragged those headers from "Public" into "Project". Now they don't get installed in $(BUILD)/usr/local/include, and I'm able to make an ipa file from the archive!
I hope Apple fixes this horrible usability problem with XCode. It gives absolutely no indication of what's wrong, it just doesn't work. I hate dimmed out controls that don't tell you anything about why they're dimmed out. How about instead of ignoring clicks, the disabled controls could pop up a message telling you why the hell they're disabled when you click on them in frustration?
Assuming you've done a successful Product > Archive then, from Organizer (Shift Apple 2) click Archives.
Select your Archive. Select Share. In the "Select the content and options for sharing:" pane set Contents to "iOS App Store Package (.ipa) and Identity to iPhone Distribution.
Click Next, enter an App name and click Save.
Full gory details with screenshots are here: Xcode4UserGuide
I had the same problem... Had to recreate the project from scratch.
Note: my project was created in XCode 3.1 and was linking against a static library that was being built as a subproject (to a common destination). I changed this to build the source instead when I recreated the XCode project in XCode 4.
Now doing a Product/Archive/Share... gets the option of "iOS App Store Package (.ipa)" directly above "Application" (which is now greyed out) and "Archive" (which exports the .xcarchive).
Same issue. I solved setting the "skip install" flag to YES for each external projects, leaving the other targets of the main project unchanged.
I also had to go to "Edit scheme…", choose the "Archiving" panel and set the correct build setting for my ad-hoc purpose.
Then a simple Product -> Archive -> Share made the expected job.
You will need to Build and Archive your project. You may need to check what code signing settings you have in the project and executable.
Use the Organiser to select your archive version and then you can Share that version of your project. You will need to select the correct code signing again. It will allow you to save the .ipa file where you want.
Drag and drop the .ipa file into iTunes and then sync with your iPhone.