This guide explains how to set up your system and devices in the Apple Developer portal. It also explains how to build your apps for testing or distribution.
You must have an Apple Developer account to install/test apps on iOS devices and publish to the App Store. Once registered and logged in, enter the Member Center, navigate to the Certificates, Identifiers & Profiles dashboard, and click on Certificates within the iOS Apps column. Alternatively, if you've already entered the iOS Apps section from another page within the portal, click the All button under Certificates in the left column.
In the upper-right corner, click the [+] button to create a new certificate.
You'll be prompted to choose which type of certificate to create. There are two types which pertain to this guide:
Development → iOS App Development — use this during development to test on your own devices.
Production → App Store and Ad Hoc — use this only for submission to the App Store or to install your app on a limited number of registered devices.
Select the type and click Continue at the bottom. You'll be prompted to generate a new certificate. As indicated in the instructions, open the Keychain Access tool from the Applications → Utilities folder.
From the main Keychain Access menu, select Certificate Assistant → Request a Certificate From a Certificate Authority. You will be presented with a form containing the following fields:
User Email Address — enter the email address associated with your Apple Developer account.
Common Name — enter your name or company/team name.
CA Email Address — this field is not required, since you will save the certificate to disk.
Request is: — select Saved to disk.
Click Continue and then specify where to save the file (Desktop is fine). This will generate the certificate signing request. Click Done in the next window.
Back in the developer portal, proceed to the next step, titled Generate your certificate. Near the bottom, under Upload CSR file, click the Choose File... button and select the file you just created. Click the Generate button to confirm.
The final step is to download and install the certificate on your local keychain. Follow the instructions provided on the screen.
Back in the Certificates section of the developer portal, the new certificate should appear.
Some guides begin with creating App IDs, but we recommend that you register your devices first. This will save you the task of modifying and
Connect the device, open Xcode, and then open the Devices window by selecting Window → Devices.
In the left column, select the device. If this is the first time you're using the device for development purposes, you may need to enable it for development by selecting Use device for development in the main pane.
Back in the developer portal, click the All button under Devices in the left column.
In the upper-right corner, click the [+] button to register a new device.
You'll be prompted to register either one device or multiple devices. If you choose the first option, enter the following information:
Name — this name is only visible to you and helps to identify the device.
UDID — this 40-character hexadecimal value is the Unique Device Identifier for the device. You can locate this by opening the Xcode Devices window, selecting the device in the left column, looking for Identifier in the information panel,
Click Continue to register the device. Back in the Devices section of the developer portal, the new device should appear.
Repeat this process for all of your additional devices.
Next, you must create a new App ID for each unique Corona app.
If you are already familiar with iOS provisioning, please note the following points specific to Corona:
Do not use a wildcard App ID with Corona apps — always use an explicit one.
Do not specify CFBundleIdentifier
in the iphone
→ plist
section of build.settings
. Corona will use the ID from the provisioning profile, so you don't need to include it in the build settings.
In the developer portal, click the App IDs button under Identifiers in the left column.
In the upper-right corner, click the [+] button to create a new App ID.
Fill in the information:
App ID Description — only you will see this; it helps you identify the app.
App ID Prefix — this should be set to the Team ID that's associated with your developer account.
App ID Suffix — this is not visible to consumers, but it must be unique. Apple recommends that you specify the Bundle ID in com.domainname.myapp
.
App Services — select the services you would like to enable.
Click Continue. This should lead to a screen where you can confirm the App ID details. Click Submit to complete the creation of the App ID. Back in the App IDs section of the developer portal, the new ID should appear.
If you configure an App ID without additional services like Push Notifications, and later add those features to the App ID, you must reinstall the provisioning profile by repeating all of the download and installation steps outlined in the next section. Thus, it's best to select all of the services which you intend to utilize in the app.
All iOS apps require that you use provisioning profiles during development. You cannot run an app on a device until you provision that device for development.
In the developer portal, click the All button under Provisioning Profiles in the left column.
In the upper-right corner, click the [+] button to create a new provisioning profile.
You'll be prompted to choose which type of provisioning profile to create.
Development: iOS App Development — use this during development to test on your own devices.
Distribution: App Store — use this only for submission to the App Store.
Distribution: Ad Hoc — use this to install your app on a limited number of registered devices.
Select the type you want to create and click Continue. On the next screen, you'll be prompted to select the App ID to associate with the profile. Assuming you've created at least one App ID, select it from the list and click Continue. If you haven't created any App IDs, please see Creating App IDs above.
Next, you must associate at least one certificate with the provisioning profile. Select the appropriate certificate(s) from the list and click Continue. Note that the provisioning profile must be associated with a matching certificate type. For example, if you want to create a provisioning profile for distribution, you must first create a distribution certificate. If no certificates exist for the type of profile you wish to create, the system will prompt you to create one — in this case, please see Creating Certificates above.
Now proceed to the proper section below, since the steps vary for each profile type.
You must associate at least one device with the development provisioning profile. Select the device(s) from the list and click Continue. If you haven't registered any devices, please see Registering Devices above.
On the next screen, you must provide a Profile Name for the provisioning profile. This will be used to identify the profile in the developer portal. Also, confirm the settings that you made in the previous steps. When you're ready, click Generate to create the profile.
Next, download and install the provisioning profile (click the Download button and then
Back in the developer portal, click Done. The new profile should appear in the list, marked as Active in the Status column.
Now you must install the profile on each device that you selected during the profile creation. Connect the device to your computer and Sync it from within iTunes. When it's done, open the Xcode Devices window,
Finally, to associate the new profile with Corona, restart the Corona Simulator. The profile should appear as a Code Signing Identity in the build window. See Build Process below for more details.
You must provide a Profile Name for the provisioning profile. This will be used to identify the profile in the developer portal. Also, confirm the settings that you made in the previous steps. When you're ready, click Generate to create the profile.
Next, download and install the provisioning profile (click the Download button and then
Back in the developer portal, click Done. The new profile should appear in the list, marked as Active in the Status column.
Finally, to associate the new profile with Corona, restart the Corona Simulator. The profile should appear as a Code Signing Identity in the build window. See Build Process below for more details.
You must associate at least one device with the ad hoc provisioning profile. Select the device(s) from the list and click Continue. If you haven't registered any devices, please see Registering Devices above.
On the next screen, you must provide a Profile Name for the provisioning profile. This will be used to identify the profile in the developer portal. Also, confirm the settings that you made in the previous steps. When you're ready, click Generate to create the profile.
Next, download and install the provisioning profile (click the Download button and then
Back in the developer portal, click Done. The new profile should appear in the list, marked as Active in the Status column.
Now you must install the profile on each device that you selected during the profile creation. Connect the device to your computer and Sync it from within iTunes. When it's done, open the Xcode Devices window,
Finally, to associate the new profile with Corona, restart the Corona Simulator. The profile should appear as a Code Signing Identity in the build window. See Build Process below for more details.
If you aren't familiar with the available build settings for an app, please review them before proceeding with this section.
Building your app is a simple process once you have your certificate and provisioning profiles installed. You can build your application for testing in the Xcode iOS Simulator or on a device.
From the Corona Simulator, select File → Open... to load the project you wish to build.
Select File → Build → iOS...
Fill in the information:
Application Name — by default, this will match your project folder; keep this name or specify another.
Version — specify a version name for your app.
Supported Devices — select either
Provisioning Profile — select the appropriate provisioning profile for either development or distribution.
iOS SDK — select the version of iOS to build for.
Save to Folder — specify where to save the compiled app.
After Build — select which action should be performed after the app is successfully built.
Create Live Build — check this box to create a live build for
Click Build and Corona will compile the app. You will then have an application file that can be loaded on a device or submitted to the App Store, depending on which provisioning profile you selected.
There are three methods to install an app on an iOS device, as outlined below.
You can not test an app built for App Store Distribution on a device. Apps built for distribution are intended for submission to Apple.
Connect your device.
Follow the steps outlined in Build Process above, ensuring that you select
Connect your device, open Xcode, and then open the Devices window by selecting
In the left column, select the device.
In the main pane, look for the Installed Apps section which shows the currently installed apps (this list may be empty initially). Below the list, click the [+] button and navigate to the location of the .app
file which was generated by Corona. Select the file and click Open. Assuming there are no provisioning/certificate errors, the app should install on the device.
Connect your device and ensure that iTunes is open.
Select File → Add to Library... .app
file that was generated by Corona. Alternatively, drag the file over the iTunes dock icon and release.
The view should change to the device's info screen and show all installed apps. Confirm that your app is listed in the Apps menu on the left.
Sync the device and the app should install. Note that iTunes can be particular about app versions — if you repeatedly test new versions of your app, you should remove the previous version from the device before installing the new version. This will ensure that the most current version is installed.
On occasion, you may need to refresh the provisioning profiles via Xcode. This can be accomplished as follows:
In Xcode, open the Preferences window by selecting Xcode → Preferences....
Select Accounts from the upper tab bar.
Select the desired account under Apple IDs in the left pane.
In the lower-right section, click the View Details... button.
A panel should open, showing the associated provisioning profiles. In the
Quit and restart both Xcode and the Corona Simulator and proceed with the build process.