iOS Mobile Application Development
Go Up to Types of Multi-Device Applications You Can Create
RAD Studio provides the tools that you need to develop applications that target the iOS platform. Using FireMonkey, you can create an iOS application and deploy it either for iOS simulators (Delphi) or for iOS devices (C++ or Delphi).
The procedure for developing iOS apps in RAD Studio is generally the same as the procedure for developing Android apps in RAD Studio. One significant difference is that PAServer and connection profiles are required for iOS development, whereas they are not used for Android development. Both iOS and Android require the addition of an SDK for the target platform.
Comparison of Development Requirements for iOS and Android | |
---|---|
iOS Requirements | Android Requirements |
Does not apply. | |
Does not apply. | |
Does not apply. | |
Does not apply | |
Install the USB driver for your Android device and connect to your Android device by USB connection. | |
Does not apply. |
Verify or set the Uses Permissions needed for your Android application |
Contents
- 1 Hardware Requirements
- 2 Preparing Your Development Environment
- 3 Developing Your Application
- 4 Preparing to Code Sign Your Application
- 5 Running Your Application
- 6 Deploying Your Final iOS Application
- 7 iOS 13 Dark Theme Support
- 8 Working with the iOS Storyboard
- 9 Known Issues
- 10 iOS Topics
- 11 See Also
Hardware Requirements
In addition to your development PC, you need the following to develop multi-device applications for iOS:
- A Mac running macOS
- An iOS device, connected to your Mac by USB cable
See FireMonkey Platform Prerequisites for a list of system requirements for your development PC and for the Mac.
Both the Mac and your development system must be on a common network, such as a local area network.
Preparing Your Development Environment
Working with a Mac and a PC
When you develop applications for iOS, in addition to your development system, you need to use the Mac for installing iOS development and distribution certificates, for running the Platform Assistant, as well as for other necessary tasks detailed below.
There are several ways you can configure a PC and a Mac to work together. See Working with a Mac and a PC to decide which configuration works best for you, and to learn how to apply that configuration to your development environment.
Configuring the Mac
On the Mac, you need to do the following:
- Install Xcode.
- From Xcode, install the Xcode Command Line Tools, which are required to sign your applications, so you can run them on an iOS device.
- Notice: Beginning from the Xcode version 6.1, the Xcode Command Line Tools are automatically installed during Xcode installation.
- Notice: Beginning from the Xcode version 6.1, the Xcode Command Line Tools are automatically installed during Xcode installation.
- Install the Platform Assistant. The Platform Assistant, distributed with RAD Studio, allows the IDE to pull the iOS SDK files from the Mac, and to run your applications on iOS devices connected to the Mac.
- Run the Platform Assistant. RAD Studio needs you to have the Platform Assistant running in your Mac to run, debug or deploy your application for the iOS Device - 32 bit, iOS Device - 64 bit and the iOS Simulator target platforms.
Configuring Your Development System
On your development system, open RAD Studio and do the following:
- Create a connection profile for the macOS platform, which is an intermediate platform that supports the iOS Device - 32 bit, iOS Device - 64 bit and the iOS Simulator target platforms.
- You need this connection profile to allow the IDE to connect to the Platform Assistant, running on the Mac.
- Add an SDK to the IDE for the iOS Device - 32 bit and iOS Device - 64 bit target platforms. RAD Studio creates in your development system a local file cache of the iOS SDK from the Mac, so you can build your applications for iOS locally.
Developing Your Application
To create a new multi-device application in RAD Studio, select either File > New > Multi-Device Application - Delphi or File > New > Multi-Device Application - C++Builder, select one of the choices, and click OK. For information about the different choices, see Types of Multi-Device Applications You Can Create. The default target platform is Android, although iOS target platforms are available in new multi-device applications.
You can use both the FireMonkey framework and the RTL library to develop your multi-device application. See Creating an iOS App.
The best way to get started with iOS application development is to follow the mobile tutorials: Mobile Application Development (iOS and Android).
Preparing to Code Sign Your Application
In order to run your application on an iOS device or distribute your application to others, you must:
- Join the Apple Developer Program. Membership in the Apple Developer Program allows you to obtain from Apple all the necessary certificates and tools to run and deploy applications for iOS devices.
- Acquire an iOS developer certificate, which is necessary to sign your application.
- Provision your application, so you can run it on your iOS devices.
Running Your Application
The following pages describe the required steps to run your application on an iOS simulator or an iOS device:
Deploying Your Final iOS Application
Before each release of your iOS application, you should check that every setting is properly configured. See Preparing an iOS Application for Deployment.
After your iOS application is ready for final deployment, you can choose from two different methods to distribute your application: Ad hoc distribution or Application Store distribution.
The steps to deploy your application vary depending on the chosen distribution method:
- Deploying Your iOS Application for Ad hoc Distribution
- Deploying Your iOS Application for Submission to the App Store and Submitting Your App to the App Store
For additional information about these distribution methods, see the Apple documentation.
iOS 13 Dark Theme Support
RAD Studio 10.3.3 includes Dark theme support for iOS 13.
Built-in Dark Theme Support
The Dark theme support is enabled in the FireMonkey framework by default, for both the styled controls and the natively rendered controls.
For developers using components such as TEdit and TSwitch which support native presentation on iOS alongside FMX style rendered controls (using default platform style), the application UI gets automatically rendered according to the end user's iOS setting.
Dark theme support extends to the system status bar, providing support for both themes (light and dark).
Light Theme Only
Developers can limit the application UI to just the light theme by setting the key UIUserInterfaceStyle = light
in the Application > Version Info.
If a developer does not specify the key in Version Info, end users will see either the dark or light theme, depending on the iOS settings on the user's device, as long as the application is built with the iOS 13 SDK.
Working with the iOS Storyboard
For new FireMonkey projects created in a new directory, no additional steps are required for using the built-in IDE support for the storyboard.
If you have an existing FMX project for the iOS platform from a previous RAD Studio version, you need to delete the info.plist.TemplateiOS.xml from your project directory.
There are two different steps to customize the storyboard launch screen support for iOS in 10.4, depending on whether you’re using your own compiled storyboard or starting with a new one using what’s provided in 10.4.
Option 1) User supplies his own compiled storyboard and asset catalog (*.storyboardc and Assets.car). In order to use that with 10.4, follow the steps below:
- Uncheck *.launchscreen from being deployed in Project | Deployment
- If the name of the storyboard file is not LaunchScreen.storyboard, you will need to edit the info.plist.TemplateiOS.xml, and replace the "<%StoryboardInfoPListKey%>" with the updated "UILaunchStoryboardName key/value"
- Open Project | Deployment and add the compiled storyboard and asset catalog files
Option 2) User modifies the default storyboard and asset catalog provided by the IDE. If you’re using this option, follow the steps below:
- Edit the LaunchScreen.storyboard and Assets files in LaunchScreen.TemplateiOS as needed
- Open Project | Deployment and add additional launch screen images to be deployed if any
The info.plist.TemplateiOS.xml and LaunchScreen.TemplateiOS templates can be found in the following location:
a. <bds>\ObjRepos\<locale>\iOS b. %APPDATA%\Embarcadero\BDS\21.0 c. the location where the project is located.
The IDE looks for these templates in the following order: Project directory, %APPDATA% directory, and ObjRepos directory.
RAD Studio supports the icon sizes required by Apple for iOS.
Known Issues
- If you encounter an issue with the new iOS 9 "Apple Transport Security" feature, see Restriction for HTTP protocol for information on how to fix it.
iOS Topics
- Prepare Your Development Environment (iOS):
- Develop Your iOS App:
- Migrating Delphi Code to Mobile from Desktop
- Migrating C++ Code to Mobile from Desktop
- Creating an iOS App
- Form Factor Settings in RAD Studio
- Using Styles for iOS: Multi-Resolution Styles, and the Black and Transparent Styles
- Using Native iOS Controls
- Using the iOS In-App Purchase Service
- Using the iAd Service
- Mobile Code Snippets
- Mobile Tutorials: Mobile Application Development (iOS and Android)
- Prepare to Sign Your iOS App:
- Run Your iOS App:
- Deploy Your iOS App:
- Troubleshoot Your iOS App:
- Mobile Tutorials: Mobile Application Development (iOS and Android)
- Setting Up Your Development Environment for the iOS Device:
- Using Basic iOS Interface Elements:
- Mobile Tutorial: Creating an Application for Mobile Platforms (iOS and Android)
- Mobile Tutorial: Using a Button Component with Different Styles (iOS and Android)
- Mobile Tutorial: Using a Calendar Component to Pick a Date (iOS and Android)
- Mobile Tutorial: Using Combo Box Components to Pick Items from a List (iOS and Android)
- Mobile Tutorial: Using the Web Browser Component (iOS and Android)
- Mobile Tutorial: Using Tab Components to Display Pages (iOS and Android)
- Mobile Tutorial: Using ListBox Components to Display a Table View (iOS and Android)
- Mobile Tutorial: Using Layout to Adjust Different Form Sizes or Orientations (iOS and Android)
- Using Device Functionality:
- Using Backend as a Service (BaaS):
- Accessing a Database:
See Also
- FireMonkey Platform Prerequisites
- Rules for Naming Multi-Device Projects and Files
- Wizards for Creating FireMonkey Multi-Device Applications and Components
- Multi-Device Application Templates
- Delphi iOS Compilers:
- BCCIOSARM, the C++ Compiler for the 32-bit iOS Device
- BCCIOSARM64, the C++ Compiler for the 64-bit iOS Device
- Automatic Reference Counting in C++
- Differences between Windows and macOS
- Android Mobile Application Development
- macOS Application Development
- PAServer, the Platform Assistant Server Application
- EDN: iOS User Interface Design with Delphi XE4