How to Create a Free iOS Development Provisioning Profile
Prior to Xcode 7, if you wished to test your iOS application on any physical device, you had to pay Apple fa subscription feed to do so. This is no longer the case, as you can now create free iOS development provisioning profiles via Xcode 7 and then use these to create standalone applications, which will run on your iOS devices.
At time of writing, Xcode 7 is not compatible with LiveCode, but here is a workaround that will allow you to generate free profiles and use them with the current version of LiveCode.
- Latest release of LiveCode (Tested with 7.1.DP1)
- Xcode 7 (Currently in beta)
- Xcode 6.4 (Other older Xcode versions may work)
Create Apple ID
Create a Free Apple ID: https://appleid.apple.com/account. (This will be used within Step 3).
Open Xcode 7
Open Xcode 7 from your Applications directory.
Add Apple ID to Xcode
From within Xcode 7, navigate to “Xcode—->Preferences—->Accounts.” Press the “+” icon (red arrow above) to add the Apple ID you created in Step 1.
After you add your account, it will show within the main account window (green arrow above). Next, you should select your account and then press the “View Details” button (purple arrow above). It may take a few seconds to load.
Create Dev Certificate
Connect iOS device and create Xcode project
You will now need to connect your iOS device to your computer. With this attached, navigate to“File—->New Project” and then from within the new window, press “Game.” Then press “Next.” This will create a new Xcode project (Don’t worry, you will not need to learn any Objective-C!).
Here you will want to fill in the Product name, Organization Name, and Organization Identifier sections – all others can be left in default mode. The most important one is the Organization Identifier. I would recommend using the reverse domain name notation scheme when creating this. It should auto-populate with an example.
Once this information has been entered, press “Next.”
You will now be asked to choose a location to save your project. The directory does not matter, as we will not be working on this project except to create a profile from it.
General Project Settings
You should now be presented with the following screen (above), which is the “General” section of your Xcode project.
From here, you will want to do the following-
- Select your iOS device from the target selection dropdown (red arrow above).
- Take note of the “Bundle Identifier” (blue arrow above). This is IMPORTANT, as this identifier will be used within your LiveCode stacks standalone application settings.
- Ensure the deployment target matches or is lower than your connect iOS device (green arrow above).
- VERY IMPORTANT: Press the “Fix Issue” button (black arrow above). This is the step that actually creates the provisioning profile.
- I would also recommend testing deployment from Xcode, as this will ensure everything is set-up and running as expected. To do this, press the “Play” icon (yellow arrow above) to push this test project to your iOS device.
We are now finished with Xcode, so it can now be closed (I can hear the “Hurrahs!”). It’s now time to open up LiveCode. With LiveCode open, ensure Xcode is linked in “Mobile Support” within LiveCode’s preferences (see below). If it is not linked, then simply use the “Add Entry” button and select your Xcode instance.
IMPORTANT: Xcode 7 is not yet compatible with LiveCode, so you will NOT be able to link to this via Mobile support. What you will need to do is link to an older, supported version of Xcode (e.g. Xcode 6.4).
With Xcode linked, open a stack you wish to deploy to your iOS device and open its“Standalone Application Settings.” Navigate to the the “iOS” pane and check the “build for” box. You can then change your iOS standalone setting to suit your needs.
Two very important settings that need to be set correctly are “Internal App ID” and“Profile.” The internal app ID needs to be the bundle identifier you took a note of in step 8 and the profile should be the one that Xcode generated. If you create more than one, then the profile should closely match the name of the internal app ID.
Once all these items are set, you can close the standalone application settings window.
The final stage to building your iOS standalone is to …..build it! To do this, navigate to “File—->Save As Standalone Application” and then choose a directory where you want to build your app. Then press the “Choose” button. If all is successful you will be presented with the above dialog
Installation on iOS device
Now that you have a standalone, you will want to get it onto your device. To do this, open Xcode and navigate to “Window—>Devices.” You should be presented with a window that displays your connected devices. To install your standalone, simply drag it from its build directory into the“Installed Apps” window of your device. See above image