Mobile Tutorial: Set Up Your Development Environment on the Mac (iOS)
- 1 Requirements on the Mac and iOS
- 2 Steps to Configure Your Mac to Run Your iOS Application
- 3 Additional Steps to Configure Your Mac to Run Your iOS Application on Your iOS Device
- 3.1 Step 1: Make Sure that the Xcode Command Line Tools Are Installed on Your Mac
- 3.2 Step 2: Sign Up for a Developer Account
- 3.3 Step 3: Request, Download and Install Your Development Certificate
- 3.4 Step 4: Register Your Device for Deployment
- 3.5 Step 5: Create and Install a Provisioning Profile
- 3.6 See Also
A FireMonkey Delphi application destined for the iOS target platform can be optionally tested on the iOS Simulator available on the Mac. FireMonkey C++ and Delphi applications can be tested using the iOS Device target platform; this testing 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, the C++ Compiler for the iOS Device. Only iOS devices are supported by BCCIOSARM.
Requirements on the Mac and iOS
- 10.9 Mavericks
- 10.10 Yosemite
- 10.11 El Capitan
- (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.)
- For OS X development, the latest version of Xcode
- For iOS development, the latest version of the iOS SDK and Xcode installed, along with the Xcode command line tools.
- Note: RAD Studio does not support versions of the iOS SDK lower than 8.0.
- Membership in the Apple Developer Program.
- 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 your device for debugging and testing purposes, your system should have the configuration shown in the following figure. RAD Studio runs on a Windows PC computer. This PC computer is connected to a Mac running the Platform Assistant and having installed the appropriate versions of Xcode and iOS SDK (for iOS development). To run iOS apps on an iOS device, the iOS device should be connected via USB cable to the Mac.
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:
- Platform Assistant (PAServer)
- Xcode is the development and debug environment on the Mac and provides the required development files for OS X and iOS applications.
Step 1: Install the Platform Assistant
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 OS X installer for the Platform Assistant is named
PAServer18.0.pkg and it is available in two places:
- Inside the RAD Studio installation directory on your PC:
C:\Program Files (x86)\Embarcadero\Studio\18.0\PAServer\PAServer18.0.pkg
- On the Web, for download to the Mac:
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 (
PAServer-18.0.app) as follows:
- Navigate to the top-level Applications folder.
PAServer-18.0.appto start the Platform Assistant:
- Next you are prompted to enter your Mac user password to allow the Platform Assistant to debug (take control of another process) your application.
For more details about running the Platform Assistant, see Running the Platform Assistant on a Mac.
Step 3: Install Xcode on the Mac
You can install Xcode from any of the following sources:
- On your "OS X Install" DVD, under Optional Installs, double-click Xcode.mpkg to install Xcode on your system.
- At the Mac App Store, download Xcode for free.
- As a registered Apple Developer, you can download the latest version of Xcode as a bundle (
.dmg). To register and then download Xcode:
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. C++Builder does not support the iOS Simulator.
- iOS Simulator: To run an iOS application (Delphi only) on the iOS Simulator on the Mac, you do not have to complete the second half of this tutorial. Instead, you can now go on to the next tutorial (Mobile Tutorial: Set Up Your Development Environment on Windows PC (iOS)) to complete the configuration of your RAD Studio IDE.
- iOS Device: To run your iOS application (either Delphi or C++Builder) on your iOS Device, please use the following steps in this tutorial to complete the configuration of your Mac. Then go on to next tutorial (Mobile Tutorial: Set Up Your Development Environment on Windows PC (iOS)) to complete the configuration of your RAD Studio IDE.
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.
- Remember that your iOS device should be connected to your Mac via USB cable.
Step 1: Make Sure that the Xcode Command Line Tools Are Installed on Your Mac
- Note: Beginning with Xcode version 6.1, the Xcode Command Line Tools are automatically installed during Xcode installation.
To make sure that the Xcode command line tools are installed on your Mac:
- Start Xcode on the Mac.
- Choose Preferences from the Xcode menu.
- In the General window, click the Locations tab.
- On the Location window, check that the Command Line Tools shows the Xcode version (with which the Command Line Tools were installed). This means that the Xcode Command Line Tools are already installed and you do not need to install them.
- If the Xcode Command Line Tools are not installed, the Command Line Tools do not show the Xcode version.
- In this case, click the Downloads tab on the Location window.
- On the Downloads window, choose the Components tab.
- 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 the Apple Developer Program is a requirement for building, running, debugging, and deploying applications for iOS.
Follow the steps described at Joining the Apple 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
- In the Keychain Access application on your Mac, select from the Keychain Access menu: Certificate Assistant > Request a Certificate From a Certificate Authority:
- 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: Code Signing Guide for details.
- Save the certificate request as a CSR file, and then send it to your Certificate Authority through the iOS provisioning portal in the following way:
- When prompted, enter your Apple ID and password, and then click Sign In.
- Under iOS Apps, click Certificates.
- On the page that opens, click the plus sign (+) icon.
This opens the Add iOS Certificate wizard.
- On the Select Type page, click Continue and follow the onscreen instructions to proceed with the wizard.
- When prompted, upload the CSR file that you saved on your Mac.
- Go to iOS Provisioning Portal. You can download the Development certificate clicking the Download button as shown below:
- 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:
- Make sure your iOS device is connected to your Mac machine.
- Open Xcode and go to Devices (Window > Devices).
- Click on your device.
- Next to the Identifier label is a string of characters:
- The Identifier string represents your device's UDID.
- If you are an individual developer, register your device by adding the UDID in the Devices tab of the Apple Provisioning Portal.
- If you are part of a company/organization, ask your team admin to register your device.
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.
- If you are an individual developer, you must create a provisioning profile. For specific information, see: Creating and Downloading a Distribution Provisioning Profile.
- If you are part of a company/organization, your team admins must create a provisioning profile that you can use.
After your provisioning profile is created, you must install it into Xcode, as follows:
- Open Xcode on the Mac and go to the Devices (Window > Devices).
- Right-click the device and select Show Provisioning Profiles…
- Click the plus sing button to add a provisioning profile.
- Find your provisioning profile, select it and click Install.
- Click Done to close the window.
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.)
- Mobile Tutorial: Set Up Your Development Environment on Windows PC (iOS)
- Mobile Tutorial: Creating an Application for Mobile Platforms (iOS and Android)
- paserver, the Platform Assistant Server Application
- Installing Xcode on a Mac
- Installing the Xcode Command Line Tools on a Mac
- Installing the Platform Assistant on a Mac
- Running the Platform Assistant on a Mac
- Acquiring an iOS Developer Certificate
- Troubleshooting: Cannot Deploy to the iOS Device
- Useful Apple Web Pages: