C++Builder Mobile Tutorial: Set Up Your Development Environment on the Mac (iOS)

By: Tim DelChiaro

Abstract: Learn how to configure your Mac so you can test and deploy iOS apps with C++Builder

This tutorial comes from the RAD Studio doc wiki. Clicking links in the tutorial will take you to the doc wiki site for more information.

    Mobile Tutorial: Set Up Your Development Environment on the Mac (iOS)





A FireMonkey Delphi application destined for the iOS target platform is tested initially on the iOS Simulator available on the Mac. The second half of the testing process uses the iOS Device target platform and requires a test iOS device connected to the Mac.

  • The first half of this tutorial describes the steps that you need to perform in order to run your iOS application (Delphi only) on the iOS Simulator on the Mac.
  • The second half of this tutorial describes additional steps required in order to run your iOS Application (Delphi or C++) on your iOS Device.
Note: The iOS Simulator is not supported by BCCIOSARM.EXE, the C++ Cross Compiler for iOS Device. Only iOS devices are supported by BCCIOSARM.

    Requirements on the Mac

  • OS X 10.7 Lion or 10.8 Mountain Lion
    (Neither OS is supported on legacy PowerPC- and 680x0-based Macintosh systems. All Macs since 2007 are Intel-based; all Macs since 2008 are 64-bit, which Lion requires.)
  • iOS 5.1 and above
  • For Mac OS X development, the latest version of Xcode
  • For iOS development, the iOS SDK and the appropriate version of Xcode installed (see the table below), along with the Xcode command line tools:
iOS version   Xcode version  
iOS 6.0 Xcode 4.5
iOS 6.1 Xcode 4.6
  • Membership in one of several Apple Developer Programs, which are described in this topic under Sign up for a Developer account.
  • An iOS device connected to the Mac by USB port (required for testing or running your iOS app on the device)

    Steps to Configure Your Mac to Run Your iOS Application

To deploy an iOS application to the iOS Simulator on the Mac or to an iOS device, you need to install the following tools on your Mac:



    Step 1: Install the Platform Assistant

As discussed, the Platform Assistant must be running on the Mac when you deploy an iOS app from your PC to either the iOS simulator or an iOS device.

The Mac OS X installer for the Platform Assistant is named RADPAServer<version>.pkg, where <version> is the RAD Studio version name such as "XE5", and it is available in two places:

  • In the PAServer folder inside the RAD Studio installation directory.
    For example, C:\Program Files\Embarcadero\RAD Studio\<n.n>\PAServer\RADPAServer<version>.pkg.
  • On the Web, for download to the Mac:
Installing PAServer

For further details, see Installing the Platform Assistant on a Mac.

    Step 2: Run the Platform Assistant

In the Finder on the Mac, activate the .app file (RAD PAServer <version>.app) as follows:

  1. Navigate to the top-level Applications folder.
  2. Double-click RAD PAServer <version>.app to start the Platform Assistant:

    The Terminal window appears, displaying the Platform Assistant banner and the password prompt:

    Connection Profile password <press Enter for no password>

    PAServer sign-on message
    Either press Return, or enter a password for PAServer and then press Return.
  3. Next you are prompted to enter your Mac user password to allow the Platform Assistant to debug (take control of another process) your application. Enter your password, and select Take Control:


For more details about running the Platform Assistant, see Running the Platform Assistant on a Mac.

    Step 3: Install Xcode on the Mac

Xcode is the development and debug environment on the Mac, and provides the required development files for Mac OS X and iOS applications.

You can install Xcode from any of the following sources:


    Next Steps

You have configured your Mac to run an iOS Application on the iOS Simulator.

Note:  Only Delphi applications can be run on the  iOS Simulator .
  • To run your iOS Application on your iOS Device, please use the following steps on this page to complete the configuration of your Mac. Note that you can perform these steps after you test an application on the iOS Simulator (Delphi apps only).


    Additional Steps to Configure Your Mac to Run Your iOS Application on Your iOS Device

The following additional steps enable you to run your iOS Application on your iOS Device.




    Step 1: Install the Xcode Command Line Tools on a Mac

To install the necessary Xcode tools using Xcode on the Mac:

  1. Start Xcode on the Mac.
  2. Choose Preferences from the Xcode menu.
  3. In the General panel, click Downloads.
  4. On the Downloads window, choose the Components tab.
  5. Click the Install button next to Command Line Tools.
    You are asked for your Apple Developer login during the install process.

For more details, see Installing the Xcode Command Line Tools on a Mac.


    Step 2: Sign Up for a Developer Account

Membership in one of the iOS developer programs is a requirement for building, running, debugging, and deploying applications for iOS.

You can join a developer program in either of the following ways:

  • As an individual developer.
  • As a member (or leader) of a team in an enterprise (business) program or university program.

For more details, see Joining an iOS Developer Program.

    Step 3: Request, Download and Install Your Development Certificate

Applications that are deployed on the device (or on the iOS Simulator) need to be cryptographically signed before they run. The Development certificate contains information that is needed for signing the applications. Each individual (an individual developer or a team member) must have a unique development certificate, which can be used for multiple applications.

For development teams, development certificates must be requested by each team member, and these requests must be approved by a team admin.


    Request, Download and Install Your Certificate

  1. In the Keychain Access application on your Mac, select from the Keychain Access menu: Certificate Assistant > Request a Certificate From a Certificate Authority:

    Save the certificate request as a file, and then send it to your Certificate Authority by uploading it in the Apple iOS provisioning portal.
    • If you are a development team member for a corporate/organization program, your team administrator needs to approve your request. After your team administrator approves it, you can download the certificate.
    • If you are an individual developer, you should see a download option for your certificate shortly after you request it. See Apple documentation at: Creating signing certificates for details.
  2. Go to iOS Provisioning Portal. You can download the Development certificate after the status changes from Submitted to Issued:

  3. Launch the Development Certificate by double-clicking it. It automatically loads in the Keychain Access application.

    Step 4: Register Your Device for Deployment

Before a device can run user applications, it must be registered in the Apple Provisioning Portal. Devices are registered by their Unique Device ID (UDID). The UDID can be determined using Xcode, as follows:

  1. Make sure your iOS device is connected to your Mac machine.
  2. Open Xcode and go to Organizer (Window > Organizer).
  3. In the Devices tab, click on your device.
  4. Next to the Identifier label is a string of characters:

    The Identifier string represents your device's UDID.

    Step 5: Create and Install a Provisioning Profile

Provisioning profiles are used for linking a developer and devices to a development team. This provisioning profile is required for running applications on an iOS device.

After your provisioning profile is created, you must install it into Xcode, as follows:

  1. Open Xcode on the Mac and go to the Organizer (Window > Organizer).
  2. In the Library section, select Provisioning Profiles and click Refresh.
  3. Xcode asks you to sign in with your Apple ID. Enter your credentials and select Log in.
    The provisioning profiles available to you are installed into your Xcode:

  4. Select a valid iOS provisioning profile and drag-and-drop it into the Provisioning profiles of your test device.

You have configured your Mac to run your iOS Application on your iOS Device.

To run your iOS Application, please see Mobile Tutorial: Set Up Your Development Environment on Windows PC (iOS) and complete the configuration of your RAD Studio IDE. (If you have configured your PC as part of running your application on the iOS Simulator, you can skip this step.)

    See Also

Server Response from: ETNASC01