Tutorial - Building your App for Release with Xcode and remotebuild (iOS)

Note Before reading this tutorial, please make sure that you have set up your environment properly for building and testing apps. Please read Preparing Mac for iOS App Development first.


Request a distribution certificate

A distribution certificate identifies your team or organization.

If your team already has one and you want to reuse it, see How to share an iOS distribution certificate. Then, skip straight to the Start remotebuild on your Mac section.

If you don't have a distribution certificate yet, continue on with this section and we'll help you set one up.

  1. Start Xcode.

  2. In Xcode, add your Apple ID (If you haven't done so already).

    See Add your Apple ID account.

  3. In the menu bar, choose Xcode->Preferences.

  4. In the Accounts page, choose the View Details button.

  5. In the account details page, choose the Create button next to the iOS Distribution signing identity.

    Create button

    Looking for more information about signing identities? See Creating Signing Identities (Optional reading).

  6. Choose the Done button to close the account details page.


Create a distribution provisioning profile

A distribution provisioning profile lets you submit your app to the store.

  1. On the Member Center page, choose the Certificates, Identifiers & Profiles link.

  2. In the Certificates, Identifiers & Profiles page, choose the Provisioning Profiles link.

  3. In the Provisioning Profiles page, choose the + button.

    Add button

  4. In the What type of provisioning profile do you need? page, choose the App Store option, and then choose the Continue button.

    App Store Provisioning Profile

  5. In the Select App ID page, choose the App ID of your app, and then choose the Continue button.

    App ID popup menu

  6. In the Select certificates page, select the distribution certificate that you created earlier in Xcode, and then choose the Continue button.


  7. In the Name this profile and generate page, name your profile, and then choose the Continue button.

  8. In the Your provisioning profile is ready page, choose the Download button.

Need more detail? See Creating provisioning profiles using Member Center.


Download the distribution provisioning profile

  1. Open Xcode.

  2. In the menu bar, choose Xcode->Preferences.

  3. In the Accounts page, choose the View Details button.

  4. In the account details page, choose the Download button next to your provisioning profile's signing identity.

    Download button

  5. Choose the Done button to close the account details page.


Start remotebuild on your Mac

You can start remotebuild with secure mode or without secure mode.

Option 1: Start the remotebuild (secure mode)

This is the safest mode. Your build payload is encrypted and that protects your intellectual property from being intercepted. When you start remotebuild in secure mode, you'll get a security PIN. You can't connect to remotebuild without it. That prevents outsiders from using the open port of remotebuild to run malicious code.

To start remotebuild in secure mode, type this command.


The agent installs Homebrew, and then starts. The host name, port number, and security pin appear in the Terminal app.

Remote Agent Output

You'll use those pieces of information in the next section. In fact, you'll want to do that part fairly soon because the security pin is active for only 10 minutes.

Option 2: Start remotebuild (without secure mode)

This is the easiest yet riskiest way to start remotebuild. Simple HTTP connections is used to transfer build payloads.

Often times when folks have trouble connecting to their remote agent, they'll start it without secure mode and the connection issue disappears.

Start remotebuild without secure mode only if you are comfortable with the trade-offs between risk and convenience.

For example, if your Mac is publically accessible over the internet and has access to sensitive materials, you'll probably want to run remotebuild in secure mode. If you don't, anyone could build an app against your remotebuild, and that app could run malicious code. That said, if your Mac is accessible to only you, it's easier and less error prone to run your remotebuild without secure mode.

To start the remote agent without secure mode, type this command

 remotebuild --secure false  

The agent installs Homebrew, and then starts. The host name, and port number appear in the Terminal app.

You'll use those pieces of information in the next section.


Open your project with DB AppMaker

  1. Start DB AppMaker and open your project.
  2. In the [Config] -> [Platforms] tab, enter all the information for the app. Read Config Settings for details.


Generate and build your project

  1. Go to the [Generate] tab, change the [Project folder] if necessary, e.g. C:\Users\user\Documents\DBAppMaker\Projects\project1\,
  2. Set the [Platform] as "iOS",
  3. Set the [Command] as "Release".

Press the [Generate] button to generate, the Remote Build Settings will show up:

Enter the host name or Ip address of your Mac, the port number, the PIN (if any) of remotebuild, and your Apple development team ID, press [OK] to continue.

Note If you do not know your Apple development team ID, please read Preparing Mac for iOS App Development.

This starts a build on remotebuild and uses the distribution certificate and the matching provisioning profile to build a release signed iOS Application Archive (.ipa) file which you'll find in the bin/iOS/Release folder of your project.


Submit your app to the store

  1. Copy the .ipa file into a folder on your Mac.

  2. Create an iTunes Connect Record for your app.

  3. Use the Application Loader to upload your .ipa file to iTunes.

    1. Launch Xcode.
    2. Choose Xcode > Open Developer Tool > Application Loader from the menu bar.
    3. Log on with your Apple ID.
    4. Click on Deliver Your App. The Application Loader will check with iTunes Connect to see if any apps are "Waiting for Upload", and display a list. Select the correct one.
    5. Select the .ipa file on your system when it asks you for it.
    6. Application Loader with then perform a series of tests on the file. If it passes, the file will get uploaded to iTunes Connect.
    7. The status in iTunes Connect will change to "Waiting for Review".
    8. A few days later, expect an email from Apple either saying the app is approved or with a list of issues to correct. The exact time varies: you can check the current wait times here: http://appreviewtimes.com

Apple reviews your app. If they don't accept it, you'll receive an email that explains the reason and what you can do to fix it. These articles describe common reasons why apps get rejected.



 ©2017 e.World Technology Ltd. All rights reserved.