iOS - export to ipa thru command line
Recently I have come across an issue which Xcode 6 keep crashing when exporting ipa or validate the app.
I got no choice but have to export the ipa on command line.
$ xcodebuild clean -project /path/to/project.xcodeproj -configuration Release -alltargets
$ xcodebuild archive -project /path/to/project.xcodeproj -scheme "Scheme name" -archivePath /path/to/output
See the image above, the scheme name you can refer to Xcode project.
E.g. Warranty Reminder
$ xcodebuild -exportArchive -archivePath /path/to/output.xcarchive -exportPath /path/to/output -exportFormat ipa -exportProvisioningProfile "Provisioning Profile Name"
Regarding the provisioning profile, follow exactly the same as what you see in Xcode.
E.g. iOSTeam Provisioning Profile: com.jslim89.Warranty-Reminder
Note that the output file name without the ipa extension.
I have make this into a shell script, you can download here.
Usage: Just edit the file, instruction is inside. Then run in your terminal
chmod ugo+x export.sh