Upcoming event

Be-Delphi Delphi Developer Day

Be-Delphi is organizing their first (of many) Delphi Developer Day on November 17th in Edegem near Antwerp. That day will be completely dedicated to Delphi and Prism.

At Be-Delphi, Devia will be holding a talk about the new LiveBindings in Delphi XE2, so be sure to grab a hold of me and say hello !

Configuring Delphi XE2 and your mac to develop, test and deploy iOS apps

written by Stefaan Lesage on 29/09/2011

Today we are back with another Delhi XE2 Video Tutorial ... this time I will be showing how to get ready to develop iOS applications using Delphi XE2 and FireMonkey.

Prerequisites

Unlike building a Mac version of your Delphi XE2 FireMonkey application, creating an iOS application using Delphi XE2 and FireMonkey has some prerequisites.

XCode

First of all you will need to install XCode on your Mac. This can easily be done by downloading XCode from the Mac AppStore, or through the developer portal website. For the iOS versions of your Delphi XE 2 FireMonkey apps you will have to compile them using XCode. From within XCode you will be able to debug those applications and deploy them on a physical device.

FreePascal and FireMonkey

In order to build your Delphi XE2 FireMonkey applications for iOS devices you will need the FreePascal compiler and the necessary FireMonkey files. Luckily this can be found in your Delphi XE2 installation folder. Simply copy the Disk Image File (dmg) over to your mac and run the installation.

Apple Developer Program

If you want to deploy your applications to a physical iOS device, you will need to register for the iOS Developer Program which will cost you about $99 or 79 € per year. You will also have to be part of that iOS Developer program if you ever want to publish you Delphi XE2 FireMonkey apps to the iOS AppStore.

Creating a test iOS application using Delphi XE2 and FireMonkey

Creating a new FireMonkey iOS application

Unlink Delphi XE2 FireMonkey applications for the Mac, FireMonkey iOS applications are a special type of Delphi XE2 project. So you will have to create a new application using the corresponding menu. In our example we will create a very simple application ... noting special ... just to show you everything works nicely.

Exporting the Delphi XE2 FireMonkey Application to XCode

As mentioned before ... you currently still need XCode and the FreePascal compiler to Build your iOS application. Due to some limitations in FreePascal your Delphi XE2 FireMonkey code will need to be modified slightly so it can be compiled (one example is the Dotted namespaces which doesn't seem to be working under FreePascal). In order to do this a little utility can be used called dprtoxcode.exe

The Tutorial shows you how you can add this little utility to your Delphi XE2 tools menu so it is easier to use.

Building & Testing your application using XCode

Once everything is ready, you can open the XCode version of your Delphi XE2 FireMonkey project, build it and run it in the Simulator to test it if necessary. From here you could also deploy it to a physical iOS device or the iOS AppStore, but for that you will need to enroll in the iOS Developer Program.

In our Video Tutorial we will be building a small sample application to show you how the process is supposed to be done. It isn't a full blown iOS application though, but just a little example.

Final Words

Well ... this tutorial should have shown you the basics of setting everything up and even showed you how to create your first iOS application. If you have any comments or suggestions ... feel free to post them here as a comment or contact us.

Meanwhile ... have fun with Delphi XE2 and FireMonkey ... and if you want to learn more about Delphi XE2, make sure you also check the Delphi XE2 page or RAD Studio XE2 page on the Embarcadero Website.

If you want, you can also have a look at the video on YouTube. You should be able to find an HD version right here

Configuring Delphi XE2 and your mac to develop, test and deploy iOS apps with FireMonkey

Comments

Commenting is not available in this weblog entry.

Archive