Task 3: Create the app archive

Task 3.1: Set Bundle Identifier

In order for the apps running on the same mobile device to be recognized as running on one device not on multiple devices by the Appeon License file, you will need to always input the same App ID for all apps and specify the same bundle identifier for the same app. For details, refer to the section called “Product Activation” in PowerServer Configuration Guide for .NET or in PowerServer Configuration Guide for J2EE.

The App ID is made up of two parts: App ID Prefix + App ID Suffix (Bundle Identifier), in this format "AppIDPrefix.BundleIdentifier", take VZ5P796LS6.com.abcexample.1 for example, VZ5P796LS6 is the App ID Prefix, com.abcexample.1 is the App ID Suffix (Bundle Identifier).

You would need to modify the Bundle Identifier in the Xcode project settings to match with what you have specified when creating the App ID (in Task 1.4: Create an App ID).

Follow steps below to specify the consistent Bundle Identifier in the project settings:

Step 1: Double click the EonNativeApp.xcodeproj file from the package to open the project in Xcode.

Step 2: Select the project or target, then select the General tab on the right, and then input the bundle identifier in the Bundle Identifier field.

If you specify a wildcard bundle identifier when creating the App ID, you will need to replace "*" with an explicit string, for example, com.abcexample.1 or com.abcexample.app1 etc.

Bundle Identifier in General tab

Also make sure the same Bundle Identifier is input when uploading the app to the App Store in the later steps.

If you want to make change to the Bundle Identifier, please make sure the same Bundle Identifier is used consistently in the General tab and the App Store upload process.

Task 3.2: Code sign the app

You now code sign the app with the signing certificate contained in the corresponding provisioning profile.

To set the code signing identity to the certificate:

Select the project or target, then select the Build Settings tab on the right, drag down the screen to find the Signing group, make sure Code Signing Identity is set to the corresponding distribution certificate (identified by your App ID), and Provisioning Profile is set to the corresponding provisioning profile.

Code signing

Task 3.3: Review the archive scheme settings

You would need to double check the scheme settings to ensure you do not archive a debug version of the app.

To review the archive scheme:

Step 1: From the Xcode dropdown menu, choose Product > Scheme > Edit Scheme to open the scheme editor, as shown in the following figure.

Edit Scheme

Step 2: In the scheme editor, do the following:

  1. On the top left panel, select Generic iOS Device.

  2. In the left column, select Archive;

  3. Make sure Release (not Debug) is selected from Build Configuration;

  4. Modify the archive name or use the default name in the Archive Name field.

  5. Click Close to save the settings.

Archive Release

Step 3: (Optional) Select the project or target, then select the General tab on the right, and then configure the Xcode project for distribution. All the information specified in the PowerServer Toolkit Package tool can be reconfigured here and you can also configure those that are not listed in the PowerServer Toolkit Package tool (because only the required information are listed for configuration in the PowerServer Toolkit Package tool).

For details about how to configure the settings in Xcode, read Configuring Your Xcode Project for Distribution in the Apple document App Distribution Guide.

Task 3.4: Create the archive

Now you are ready to create an app archive.

Step 1: Select the project in the Xcode project navigator.

Step 2: From the Xcode dropdown menu, choose Product > Archive. (If this option is not available, double check that Generic iOS Device is selected in menu: Product > Destination)

Archive

If a prompt appears asking whether code sign can sign the app using a key in your keychain, input the password and click Allow or Always Allow.

After the project is built successfully, it will appear in the Archives window, as shown below.

Now the app archive is ready. You can click Distribute App in the Archives window to submit the archive to the Apple App Store or save the file for enterprise or Ad-Hoc distribution.

Archive list

(Optional) Import the certificate

MobiLink supports the encrypted transmission of the synchronous data stream by using HTTPS. If you want to use HTTPS for the encrypted transmission of the synchronous data stream, you should add the certificate file into the project. The following steps take EonNativeApp as an example.

  1. Right click EonNativeApp and select Add Files to "EonNativeApp..." to choose the certificate file, as shown in the following figure.

    Add files to "EonNativeApp"


  2. In this example, choose the cer.pem.cer file. Make sure to select the Copy items into destination group's folder (if needed) checkbox, as shown in the following figure. Click Add.

    Select the destination checkbox


  3. The certificate file is added successfully and is placed in the position parallel to other folders under the EonNativeApp directory, as shown in the following figure.

    The certificate file is added successfully.


Additional settings for Xcode 9

If you use Xcode 9 to create the app archive, make sure that you also configure the following Xcode 9 settings:

Setting 1: Clear the selection of the Automatically manage signing check box. It is selected by default in Xcode 9.

Automatically manage signing

Setting 2: Select the corresponding provisioning profile from Signing (Debug) and Signing (Release) sections.

Signing (Debug)

Setting 3: Select the corresponding provisioning profile under the Provisioning Profile (Deprecated) section as well.

Provisioning Profile (Deprecated)

Setting 4: If you are archiving Appeon Workspace, modify the bundle identifier under the Product Bundle Identifier section as well.

Product Bundle Identifier