Embed IPA into an MDX File

To publish an application directly on the CEM Server, you must embed the IPA into the MDX file. This applies to the following distribution methods:

  • Enterprise
  • Ad Hoc
  • Development

Note

For Apple App Store distribution, this step is NOT necessary.

Prerequisites

Generating an MDX File

Generate IPA File

Setup the Script

  1. Make sure that the IPA_FILE_PATH includes the filename.
  2. Set the EXECUTABLE_NAME properly.
    export TOOLKIT_DIR="$PROJECT_DIR/Tools"
    export IPA_FILE_PATH="Provide IPA File Path"
    export EXECUTABLE_NAME="Provide the name for your application's app folder."
    #CONFIGURATION_BUILD_DIR comes from Xcode.
    "$TOOLKIT_DIR/CGAppCLPrepTool" SetInfo -in "$CONFIGURATION_BUILD_DIR/$EXECUTABLE_NAME.mdx" -out "$CONFIGURATION_BUILD_DIR/$EXECUTABLE_NAME-exported.mdx" -embedBundle "${IPA_FILE_PATH}"
<!--NeedCopy-->

Embed the IPA

Add a New Run Script Phase in Xcode to embed the IPA file:

  1. Click the project name on the left Project Navigator.

    Project Name

  2. Right click the app target and select Duplicate.

    Duplicate Target

  3. Give it a unique name (for example, <My Target Name>Release).

    New Release Target

  4. Click Build Phases and then click the + and select New Run Script Phase.

    New Run Script Phase

  5. Add the script and setup as Release Configuration in step Building (Optional Step) of Testing Your iOS MDX SDK Application.
  6. Click the currently selected scheme dropdown and select the new scheme that is using the new target.

    Select New Scheme

  7. Build the project.

Now this target can be used just when you want to embed the IPA into the MDX file.

Upload to CEM Server

Upload to CEM Server as you did in Testing Your iOS MDX SDK Application. This time the app should run on the device without having to sideload.

Embed IPA into an MDX File