Skip to content

Instantly share code, notes, and snippets.

@haxpor
Last active August 29, 2015 14:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save haxpor/b38cfff9df698540badc to your computer and use it in GitHub Desktop.
Save haxpor/b38cfff9df698540badc to your computer and use it in GitHub Desktop.
Export Xcode's archive file to .ipa, and sign it with the proper code signing identity.
# Export .xcarchive file into .ipa and properly sign it with implied codesign identity
# Full credits to http://www.thecave.com/2014/09/16/using-xcodebuild-to-export-a-ipa-from-an-archive/
# Set the parameters here
archiveFileName="ZombieHero"
exportIPAFileName="ZombieHero"
provisioningProfileName="Journalists inhouse"
# Export into .ipa file
echo "-- Exporting into .ipa --"
if (xcodebuild -exportArchive -archivePath "$archiveFileName.xcarchive" -exportPath "$exportIPAFileName" -exportFormat ipa -exportProvisioningProfile "$provisioningProfileName"); then
echo "-- Exporting into .ipa completed --"
else
echo "-- Exporting into .ipa failed --"
exit $?
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment