How to generate the .IPA installer for IOS IPhone in an Ionic2 project?

-2

I'm working with Ionic2 on a "Mac X Capitan OS"

after executing the command: ionic build ios and / or ionic emulate ios I get it

/Users/AppPrueba/platforms/ios/build/emulator/AppPrueba.app
** BUILD SUCCEEDED **

I want to get the installer .IPA to install it on an iPhone, or to upload it at DeployGate

    
asked by MarcoAndresito 02.09.2016 в 20:49
source

2 answers

0

Try this:

ionic build --release ios
pushd platforms/ios/

xcodebuild -scheme "$1" -configuration Release clean archive -archivePath "build/$1.xcarchive"

xcrun xcodebuild -exportArchive -archivePath "build/$1.xcarchive" -exportPath "build/$1.ipa" -exportProvisioningProfile "$2"

Based on this gist

    
answered by 02.09.2016 в 23:57
0

With this command you should be worth

ionic build ios --device --release

But you need a build.json file in the root of your project like this

{
  "ios": {
    "debug": {
      "codeSignIdentity": "iPhone Developer",
      "provisioningProfile": "UUID-del-provisioning-profile-de-desarrollo"
    },
    "release": {
      "codeSignIdentity": "iPhone Distribution",
      "provisioningProfile": "UUID-del-provisioning-profile-de-distribucion"
    }
  }
}

To get the UUID I open the .mobileprovision in a text editor and search for 'UUID', I do not know if there is another way to find it

Make sure to use Xcode 7, because with Xcode 8 right now there are problems (If you have both installed, with the command xcode-select -p you see if it points to 7 or 8 and with xcode-select -s /ruta/a/Xcode7/Xcode7.app you change it, and if you no longer have 7 download it from the Apple developer website)

    
answered by 16.09.2016 в 12:48