Starting with Xcode v6.0, Apple has changed the process of creating ipa files.
Earlier, it was possible to create an adhoc/distribution ipa using the provisioning profile & certificate. However, now it is mandatory to provide the developer account information, which your clients might not be willing to share.
It is still possible to create an ipa manually, using the terminal & xcodebuild command.
1. Assign the required certificates & provisioning profile in the Build Settings of your project.
2. Remember the Provisioning Profile name. You will be using it later.
3. Create the build using the Archive menu option.
4. In the organizer, select your build, Right-Click, ‘Show In Finder’ & copy the xcarchive file to a location of your choice.
5. Now, we are ready to create the ipa. xcodebuild has a flag -exportArchive which can create an ipa file using the xcarchive we obtained in step 4.
6. Following is the code for a shell script which takes 3 parameters & creates an ipa:
for i in "$@"; do echo $i ; done
echo "Creating ipa..."
xcodebuild -exportArchive -archivePath $archivePath -exportPath $ipaPath -exportFormat ipa -exportProvisioningProfile "$profile"
7. Create a new shell script on your mac & copy paste the code quoted above.
Usage: ./script.sh <Path to xcarchive file> <Path of ipa file to be generated> <Name of the provisioning profile(enclosed in double quotes “”)>
Example: ./script.sh ./MyArchive.xcarchive ./My.ipa “Assault Vector Dev”
8. Done 🙂