How do I Become an iOS Developer?
This lesson explains the basic steps you need to follow in order to start up as an iOS developer and deploy your applications to an iOS device. System configuration information and screen captures are provided.
iOS is the first mobile device platform that was supported by LiveCode. The steps discussed in this lesson outline a process that allows you to set yourself up as a LiveCode developer for the iOS platform and successfully build and deploy test applications. The steps are set out in chronological order, first determining the hardware and software requirements, and then setting up your system.
The lesson focuses primarily on integrating the apple iOS components with LiveCode. You can find extensive documentation on setting up your Mac for iOS development at: http://developer.apple.com/iphone/.
If you have already set your Mac up for iOS development and are ready to start creating your applications, you can move on to lesson: How do I build an iPhone application for iOS?
You will need an Intel Mac with either Snow Leopard (10.6.x) or Lion (10.7.x) installed. The iOS SDK requires approximately 10GB of free disk space. You can determine what operating system you have installed and the hardware platform you are using by selecting Apple > About This Mac from the top of your screen:
1. This indicates the operating system you are using.
2. This indicates the hardware architecture of your Central Processing Unit (CPU). You should be looking for the word Intel.
Note: It is assumed that you are familiar with the installation process of an Apple operating system and LiveCode. Please make sure these are installed before you commence with the remaining steps of this lesson.
Joining the iOS Developer Program
Before you can continue with the installation, you have to join the Apple iOS Developer Program. You can join by following this link: http://developer.apple.com/iphone. Membership is free if you are testing your applications in simulation but is subscription based if you plan on testing your applications on physical devices.
Once you have signed up to the Apple iOS Developer Program, you can go to the iOS Developer Portal and set up the required certificates (link is on the top-right of the page). Follow this guide for information on the process: Managing Devices and Digital Identities
Downloading the iOS SDK
If you do not have the iOS SDK installed, then you can download it from: http://developer.apple.com/iphone. You have to log into the iOS Dev Center and follow the link to downloads, from where you can download the latest iOS SDK. This download includes a number of iOS simulators on which you can test your applications. The SDK integrates with Xcode, allowing you to deploy to real devices.
If you are using Lion (10.7.x), you can also get the latest version of Xcode (which includes the iOS SDK) from the Mac App Store.
Installing the iOS SDK
The installation procedure differs slightly depending on whether you are using Xcode version 4.3 and above, or an older version. If using version 4.3 or higher of Xcode, you can install using the Mac App Store. You can also download a .dmg file directly from the Apple Developer Center, in this case you simply mount the .dmg file as soon as it has finished downloading, and drag the contents into your Applications folder. Open Xcode once it is installed to ensure that everything is correctly installed - you may be prompted to install additional pieces of functionality.
If using an older version of Xcode, once you have downloaded the iOS SDK, execute it and follow the steps that lead you through the installation process. The installation should leave you with a /Developer folder in the root of your system disk. Inside here are the various libraries and applications needed for iOS development.
For Xcode 4.3, the iOS simulator is located inside the Xcode application bundle, in /path/to/Xcode/Content/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications. To open the Xcode application bundle, right click on it and select "Show Package Contents". For older versions, the iOS simulator is installed in /Developer/Platforms/iPhoneSimulator.platform/Developer/Applications, by default. You can launch it by double-clicking on the application icon.
Configuring LiveCode for iOS Support
By now, you should have successfully installed the required software in your development environment. The next step is to launch LiveCode and configure it to interface with the iOS SDK.
Launch the LiveCode IDE and select LiveCode > Preferences to launch the Preferences menu. Then select Mobile Support and you are presented with the dialog shown in this step.
This dialog allows you to configure the path to iOS developer roots, at least one of which you should already have installed. Select ... under iOS SDKs and choose one or both of the iOS developer roots you have installed. Depending on your version of LiveCode, you may be prompted to enter the location of differing versions of the Xcode/iOS SDK Developer root. The left hand dialog in the above image depicts an older version of LiveCode with support for iOS 3.x and above - versions since LiveCode 5.0 only support iOS 4.0 and 5.0 and above (as seen in the right hand dialog).
If you are using LiveCode 5.5 and above, Xcode version 4.3 and above are also supported. You will be prompted as to whether your installed version of Xcode is 4.3 or higher - if so, you will need to supply the location of your Xcode application bundle (for example, /Applications/Xcode). The rest of the filepath will automatically be populated for you. If you are using version 4.2 or below, specify the location of your Developer root folder as in previous versions (for example, /Developer).
Validation checks are made once you specify the location of the iOS paths. This ensures that you have selected a valid location and have the require iOS components installed.
The Standalone Application Settings... Window
Select File > Standalone Application Settings... from the LiveCode IDE. Then choose iOS from the list of deployment options. This raises the Standalone Application Settings dialog for iOS specific builds.
You can make a stack build for iOS by selecting the Build for iOS tick box and configure any other options you wish to include. You can select the name of your application by using the General option at the top of the pane and add files to your build by using the CopyFiles option at the top of the pane.
Note: Making a stack build for iOS disables building standalone mainstacks for any other non-mobile platforms. If you wish to share code and other resources among platforms, factor your application into multiple stacks, using a different mainstack for mobile and desktop targets.
Note: Inclusions, Copy Referenced Files, Bug Reports and Stacks features are not available when building for iOS. Use the CopyFiles feature if you wish to include multiple stack files in your application.
Running Under iOS
You should now have set up your development environment for iOS and are ready to test a LiveCode application in simulation or on a physical device, if you paid a subscription.
Select the a simulator or device from the LiveCode IDE from Development > Test Target. Your Test icon on the main pain of the LiveCode IDE should now be active and will allow you to deploy your LiveCode application to iOS.
Depending on how experienced you are with LiveCode, you may want to review more of the numerous lessons and tutorials we have on developing for Android, iOS and broader lessons that explore the general concepts behind LiveCode. The release notes accompanying LiveCode releases with iOS platform support provide up to date development information and give you an overview over the features that you can access via Live Code.
The following lesson shows you how to test an application on the simulator: How do I build an iPhone application for iOS?