Creating a FireMonkey iOS App


To create your iOS app:

File > New > FireMonkey Mobile Application - Delphi

At the XE4 release, only Delphi supports FireMonkey iOS apps.

iOS Forms

Using the FireMonkey Mobile Form, you can add additional Delphi forms the same way you do with Windows and Mac OS X applications.

The uses declaration for iOS mobile form units is different from the uses for FireMonkey Desktop applications:

 uses
  System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants, FMX.Types, FMX.Controls, FMX.Forms, FMX.Dialogs, FMX.StdCtrls;

The iOS form has specific hardware-dependent properties. For example, the iOS form has a different shape or footprint than a standard desktop FireMonkey form, as follows:

  • For a FireMonkey iOS application, the form is a vertical shape:
    • ClientHeight = 480 pixels
    • ClientWidth = 320 pixels
  • For a FireMonkey desktop application, the form is a horizontal shape:
    • ClientHeight = 480 pixels
    • ClientWidth = 600 pixels

FireMonkey iOS Workflow

At different times during the FireMonkey iOS development process, you need to work either on your development platform or on the Mac. After you complete the required setup steps and compile your project in the RAD Studio IDE, running your project will transfer the executable and necessary libraries to the Mac.

Important: Start Here

  • Before starting your first iOS project, you must perform several important installation and setup steps on both Windows and the Mac. For example, you need to provide a Development Provisioning Profile for any specific iOS development devices you want to use in testing your application on the Mac.

Then develop your project in the following general sequence:

Steps in RAD Studio

  1. Start your project using either of the FireMonkey iOS wizards:
    File > New > Other > Delphi Projects > FireMonkey Mobile Application
  2. Select one of the templates and applications that are presented, such as Tabbed, or Blank Application.
  3. The iOS Form is displayed in the Form Designer.
    Use the Form Designer and Code Editor in RAD Studio to add controls to the form, to set values for properties and events, and to write the code behind.
Tip: Start creating your iOS app by working through the Mobile Tutorials: Delphi Mobile Application Development (iOS and Android).

Steps on the Mac and on the iOS Simulator or an Attached iOS Device

  1. For prototyping purposes, run or debug your project using the iOS Simulator target platform.
    • Tip: Run your application on the iOS Simulator at least once after creating the project (and whenever you make changes or add new files to the project).
  2. Select the device that is to run your app, such as:
    • The built-in iOS Simulator for initial debugging purposes.
    • A physical iOS device, connected to the Mac.

To run your iOS app on an iOS device:

  • Your iOS device must be connected to the Mac by USB cable.
  • You need to add a new SDK from the SDK Manager page. After you add the new SDK, your selected version of the iOS SDK is pulled from the Mac to your development system.
  • You must create a Development Provisioning Profile for testing your application on your development iOS device.
    The Provisioning Profile associates your Apple Developer ID with:
    • Specific iOS apps you want to run (identified by App ID)
    • The specific iOS devices where you want to run the apps (identified by the device ID or UDID)
      You can find the 40-character UDID through Xcode or iTunes. For more information, see https://developer.apple.com/ios/manage/devices/howto.action

For more information about the workflow for iOS apps on the Mac, see http://developer.apple.com/library/ios/#documentation/Xcode/Conceptual/ios_development_workflow/00-About_the_iOS_Application_Development_Workflow/introduction.html.

Component Restrictions for FireMonkey iOS Apps

While you are designing your iOS app in RAD Studio, you can only use components that are supported on iOS devices. However, be aware that the Tool Palette might contain some components that are Windows-only or are otherwise not supported on iOS.


See Also