52

Need to generate .ipa file for Ad-Hoc distribution. Client has provided only certificates, private keys and provisioning profiles which were enough to create .ipa till Xcode 5. But in Xcode 6.1 when I export as Save For Ad Hoc Deployment it gives message

To save for Ad Hoc Deployment, you need to add an Apple ID account that is enrolled in the iOS Developer Program for the development team 'xxxxxxxxxx'

enter image description here enter image description here

Is there any way of creating .ipa without developer account credentials?

Khawar
  • 9,151
  • 9
  • 46
  • 67

6 Answers6

87

Finally found a way for creating .ipa build with xcodebuild command.

  1. Right click on Archive on Organizer.
  2. Click Show in Finder.
  3. You can see .xcarchive file in Finder. enter image description here

  4. Open Terminal and cd to .xcarchive path.

  5. Using following command to generate .ipa file.

This will save .ipa on Desktop.

xcodebuild -exportArchive -exportFormat ipa -archivePath <FILE_NAME>.xcarchive -exportPath ~/Desktop/<FILE_NAME>.ipa

Still looking for better solution, don't know why Apple removed this feature from Xcode 6 :(

Khawar
  • 9,151
  • 9
  • 46
  • 67
  • 7
    I would like to copy .xcarchive after Step 3 and paste it on desktop and in step 4 Open Terminal and cd to desktop instead to a long file path :P – Bharat Dec 11 '14 at 06:05
  • Will this also sign the build with proper provisioning and certificate? – Farooq Arshed Mar 09 '15 at 12:30
  • 3
    I was trying to do the same thing using Xcode 6.1 but my IPA wont install on device. I figured out the solution that you need to specify your provisioning profile name using "-exportProvisioningProfile " option in the above command. – Pankaj Rathor Apr 24 '15 at 13:05
  • 1
    @PankajRathor what is the value of . Is it my name that shows up under "Team" in the "General" --> Identity tab in Xcode app settings? – Smart Home Jan 02 '16 at 18:25
  • Will this work for iOS App Store Deployment? I have same issue but i need to create .ipa to upload it on app store. – Bharat Modi Apr 03 '17 at 05:30
  • 1
    @ABJ I'm getting 'exportPath' doesn't exist – Charlton Provatas Dec 07 '17 at 19:12
  • what if there is no archive option is enable? – Krunal Nagvadia Dec 18 '18 at 10:39
  • 5
    This answer is probably obsolete now. – AnhSirk Dasarp Dec 05 '20 at 02:52
  • 10
    invalid option '-exportFormat' – Mahdi Moqadasi Mar 01 '21 at 14:39
  • I am getting: "`error: exportArchive: No profiles for 'com.MyApp' were found`" with Recovery-Suggestion: "`Xcode couldn't find any iOS App Store provisioning profiles matching 'com.MyApp'. Automatic signing is disabled and unable to generate a profile. To enable automatic signing, pass -allowProvisioningUpdates to xcodebuild.`" and adding `-allowProvisioningUpdates` option just changes message to `Team "MyTeam" does not have permission to create "iOS App Store" provisioning profiles.` – Top-Master Mar 20 '21 at 07:48
56

There are 3 WAYS to create .ipa WITHOUT Command & Apple Developer Account.

1. Fast & Best

(Works on all Xcode, All Mac OS, Bundled package can be used for OTA links like Diawi)

  1. Just build (Command+B) your app from XCode by setting proper code signing identities
  2. From XCode's file search at left bottom, search for .app (This will be under product directory)
  3. Right Click on this .app file and select Show in Finder
  4. Now, create directory and name it as Payload, copy .app into Payload directory.
  5. Archive/Compress(.zip) this Payload directory, rename file extension from .zip to .ipa

2. Extract .ipa from organizer

(Works on all Xcode, All Mac OS)

  1. Create Archive
  2. Go to Organizer
  3. Get location of Archive by Right Click and selecting Show in Finder

enter image description here

  1. Now right click on this .xcarchive file and select Show Package Contents
  2. Go to path Products > Applications > YourAppFile

  3. Open iTunes's on Mac and drag-drop this YourAppFile from above path in Apps tab. (NOTE: Delete the previous app with the same identifier if any)

  4. Now right click on your app under Apps tab of iTunes and select Show in Finder, this is your .ipa file !!!


3. For devs having Xcode 5.x

(NOTE: Xcode 5.x doesn’t work on El Capitan, By this way you can archive using any Xcode but you will need Xcode 5.x to create .ipa)

  1. Create Archive using any Xcode version.
  2. Close Xcode.
  3. Go to Organizer window of Xcode 5.x and from Archive tab select your archive.
  4. On top right section select Export, click radio button with title Save for Ad Hoc Deployment
  5. Click Next and Select desired code signing identities to save .ipa
Aditya Deshmane
  • 4,676
  • 2
  • 29
  • 35
20

You can also create an IPA file using Xcode 6 & latest follow below steps:

  1. Create Build File of your Project Command+B
  2. Go to Products folder & it will show app file right click "Show In Finder".
  3. Create an empty folder & call it 'Payload' then copy your app file in that folder.
  4. Archive Payload Folder & rename the zip file to YourApp.ipa
Community
  • 1
  • 1
Krunal Darji
  • 568
  • 1
  • 3
  • 11
3

There is even better way without doing all the command line stuff.

Select "Save For Ad Hoc Deployment" & Click Next. Then open the "select a development team" drop down. It will have the option "Use Local singing assets" at the bottom. Select this option & Click Choose.

Here you go. The build will be created by Xcode without Apple ID Account.

Asif Bilal
  • 4,309
  • 3
  • 17
  • 27
  • 1
    Correct. Unfortunately that option is not available in Xcode 6. It is only available in Xcode 7. – Khawar Nov 14 '15 at 08:28
  • Where is this "Save for Ad Hoc Development" option in xCode 7? – Jungle Jim Feb 08 '16 at 20:00
  • @JungleJim, please have a look in the question's graphics attached. – Asif Bilal Feb 09 '16 at 08:29
  • @AsifBilal Thanks but I can't figure out how to get to that screen in the first place without a developer account. When I go to [Product][Archive] with an iOs device hooked up, it just says "Build Failed". Same thing with a Generic iOs device. When I do the build for an emulator, the build succeeds but when I click on [Product] then [Archive] is faded and can't be selected. Or am I going to the wrong place to get to that "Organizer - Archives" screen in the first place? – Jungle Jim Feb 11 '16 at 01:01
  • @JungleJim, When you go to [Product][Archive] with an iOS device, try to find out the reason why it throws the "Build Failed" error. Once you find out the reason, resolve it. And do the preceding steps to build ipa file. – Asif Bilal Feb 11 '16 at 08:23
1

Another solution is to use Xcode 5.1.

1

From some time (for example Swift & Xcode7) when you are to make a build formula is more complicated - xcodebuild requires exportOptionsPlist parameter:

xcodebuild -exportArchive -exportOptionsPlist app.plist  -archivePath app.xcarchive -exportPath app.ipa

and app.plist contains:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
    <dict>
    <key>method</key>
    <string>app-store</string>
    <key>uploadSymbols</key>
    <true/>
    </dict>
</plist>
Leszek Zarna
  • 3,253
  • 26
  • 26
  • Getting: "`error: exportArchive: No profiles for 'com.MyApp' were found`" with Recovery-Suggestion: "`Xcode couldn't find any iOS App Store provisioning profiles matching 'com.MyApp'. Automatic signing is disabled and unable to generate a profile. To enable automatic signing, pass -allowProvisioningUpdates to xcodebuild.`" – Top-Master Mar 20 '21 at 07:38
  • Adding `-allowProvisioningUpdates` option just changes the output to: `Team "MyTeam" does not have permission to create "iOS App Store" provisioning profiles.` – Top-Master Mar 20 '21 at 07:45
  • still no answer regarding this solution? – akub Sep 23 '21 at 18:50