On 22nd April 2013 Embarcadero releases “Rad Studio XE4” claiming it could create true native apps for Windows, Mac and iOS thus one to target PC, MAC, tablets and Smartphone devices. True native apps provide more control, tighter security and a better user experience. Thus now with Embarcadero extending it’s the support for iOS app development , existing Delphi developer can start developing apps for iOS. With Delphi XE4 we get a full range of native styled user interface controls, including buttons, listboxes and combo boxes. Delphi XE4 delivers an enhanced and optimized developer workflow that automates deployment and debugging on both the simulator and device.
Before starting with the developments, let us set up our test environment.
- You need a system running Mac OS lion or Mountain Lion.
- Choose xCode version properly as the XE4 requires the iOS Simulator with iOS 5.1 support.
- Install Command Line Tool for xcode this tool can be downloaded from Apple’s official website. Choose it carefully as which one to install depends on version of your OS X.
- Now once this is done next you need to install the RAD Studio PAServer. You can find the installation file in your xe4 installation directory
- Now Start up your PAServer on XE4 it will ask you for a connection password (you can keep it blank by pressing Enter).
- Now time to run an app on the simulator. Make a “FireMonkey Mobile Application” project in XE4. Now in the project explorer you can set the target platform to “iOSSimulator” now right click on the selected target platform and select edit connection and connect to the MAC system if you had entered password for pa server during its set up then you will have to add the same one here. Once done you can Test the connectivity with the test connection button.
- Now once that is done go to Tools > Options > Environment Options and then select SDK Manager now add a new SDK to it using the add option from the SDK Manager tab.
- Now place some buttons on the form and run the app and you would see the iOS simulator opened on your Mac System and running you app.
Now we have done our setup now some tips for iOS app development.
- Go through Apple’s iOS Human Interface Guidelines so that at the end of your development you don’t have to worry about your app not adhering to Apple’s guidelines as if you don’t your app won’t be certified to be sold on app store.
- Make a list of all the features you want to provide in your app. Narrow down your requirement list to absolute minimum (Your need to be specific to the customers you are targeting). Keep your designs very simple.
- Make use of layout components, when we are talking about iOS app development we are referring to app for handheld devices like mobile and tablets which can be rotated and the app has to respond to these rotations.
- Understand how to use the anchor attribute of the components as you would be using them a lot while developing iOS apps.
- Apple gives a lot of importance to user experience so make sure your app complies with it, Make sure you don’t lose any data entered by user until it has been processed in rightful manner for the purpose it was intended for.
Now to make a iOS application run Delphi XE4 go to File>New Project>FireMonkey Mobile Application .
Now you will have a normal form like any other Delphi application and you can add controls to the form and add your business logic to it. You can run this application on you simulator if you have already done the setup or else you could try the same app on windows platform by selecting the target platform as windows.