Skip to content

Instantly share code, notes, and snippets.

@betapcode
Forked from six519/create_ipa.sh
Created December 2, 2015 15:29
Show Gist options
  • Save betapcode/fdb30e945ff30bf10fb6 to your computer and use it in GitHub Desktop.
Save betapcode/fdb30e945ff30bf10fb6 to your computer and use it in GitHub Desktop.
Building Ionic iOS Release And Generate ipa File Script
#!/bin/bash
# Thanks to: https://gist.github.com/DavidFrahm/4409d6b74e46377e7be7
# Usage: ./create_ipa.sh <Scheme Name> <Provisioning Profile>
echo "Building Ionic iOS release..."
ionic build --release ios
pushd platforms/ios/
echo "Building archive file..."
xcodebuild -scheme "$1" -configuration Release clean archive -archivePath "build/$1.xcarchive"
echo "Generating ipa file..."
xcrun xcodebuild -exportArchive -archivePath "build/$1.xcarchive" -exportPath "build/$1.ipa" -exportProvisioningProfile "$2"
echo "Cleaning up files..."
rm -rf "build/$1.xcarchive"
popd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment