LiveCode LessonsLiveCode LessonsHow To - LiveCode Mobile Tasks iOS TasksHow do I Create a Development Profile for iOS?

How do I Create a Development Profile for iOS?

This lesson describes how to set up a development provisioning profile that can be used for applications built with LiveCode. It is assumed that you have signed up to the iOS Apple Developer Program. This process is very similar to creating a distribution profile (http://lessons.runrev.com/m/4069/l/32957-how-do-i-create-a-distribution-profile-for-ios) so a few steps will be duplicates.

Introduction

A development profile is required if want to test your application on any iOS devices that you have access too.

The information discussed here is reduced and is also covered on the apple iOS Provisioning Portal website. You can access that additional information by logging into the iOS provisioning portal that is accessible from: https://developer.apple.com/.

Generating a Certificate Signing Request

Generating a Certificate Signing Request

The first step in setting up a development profile is to create a certificate signing request. You can do this on your Mac. Launch the Keychain Access.app that is stored in Applications/Utilities. Then execute the following steps in your Keychain Access application:

1. Select Keychain Access > Certificate Assistant > Request a Certificate From a

Certificate Authority... and ensure that you do not have any of your certificates

highlighted, otherwise the Provisioning Portal will not accept your certificate request.

2. Enter your valid e-mail address in the User Email Address field. Ensure that the e-mail

address is the same as the one you used when you registered as an iOS Developer.

3. Enter your name in the Common Name field. Ensure that the name you enter is the

same as the one you used when you registered as an iOS Developer.

4. A CA Email Address is not required.

5. Select the Save to disk radio button and tick Let me specify key pair information,

if it is present.

6. Press Continue.

7. A dialog appears that allows you to specify where you would like the certificate signing

request to be stored. Specify a location and select Save.

8. Press Continue.

9. The certificate is then generated and written to the file you specified under step 7.

Submitting a Certificate Signing Request

After you have generated a certificate signing request, you need to submit your certificate for approval. Log into the iOS Provisioning Portal that is accessible from: https://developer.apple.com/account/ios/certificate/certificateList.action.

This link takes you directly to the Certificates, Identifiers & Profiles section of you iOS developer account. The Certificates, Identifiers & Profiles Portal provides you with a link to Certificates. Select the "Development" tab and follow these steps:

1. Click the Add Certificate button (+).

 

2. Select "Apple Development" as type then press continue

3. On next screen select "Choose File" and select the certificate you created in the previous step and then press "Generate"

Downloading and Installing a Development Certificate

Downloading and Installing a Distribution Certificate

Remain on the same page as the one you were on when you submitted the certificate signing request, then follow these steps to download and install the certificate:

5. Download Generated certificate by clicking the "Download" button.

6. Double click the downloaded certificate to install (alternatively drag to the keychain utility)

If you by chance navigated away from this page, dont worry. Simply press the development tab again, select your Name and then press the "Download" button.

You can then follow step 6

 

Backing up your Certificates

Backing up your Certificates

It is important that you backup the keys you created. This allows you to develop on multiple Macs or reinstall the keys after unexpected data loss. You can export your private keys and certificates through the Keychain Access application:

1. Open the application Keychain Access.app that is stored in Applications/Utilities.

2. Select Keys.

3. Highlight the private key associated with the distribution certificate.

4. Select File > Export Items.

5. A window opens that allows you to specify where you would like to save your certificate.

6. Select Personal Information Exchange (.p12) as file format.

7. Select the file name.

8. Select Save.

9. You are prompted for passwords that allow you to access the key in the future.

Create App ID

The next step is to create an app ID to use with your development profile. You have the option of an explicit app ID (one that has to match your projects standalone application settings) or a Wildcard ID (this will work with any ID you use in your projects standalone application settings)

In this example, we will be creating a wildcard app ID.

1) Select Identifiers tab

2) Press (+) to add a new ID and this will take you to the "Register a New Identifier" page. Select App IDs and press continue

3) Fill in the "Description" field. This can be the name of your app or a general description such as "Testing Apps".

4) Check Wildcard and enter com.* in the bundle ID field.

6) Press "Continue". This will take you to a new page

7) Press Register

8) Select "App ID" tab again and you should see your newly created app ID

If you plan to use elements such as push notification within your app, then you MUST enable them within the settings of the App ID

 

Add Device

Before you can test your app on your iOS device, you first have to register it with your developer account. You can do this via Xcode or manually. We will show you the manual method

Start by selecting the "Devices" tab then

1) Press (+) to add your device

2) Give your device a name and enter its unique ID. The easiest way to find the uniqueID is to connect your iOS to your computer, open Xcode, Navigate to "Window-->Devices" and then select your device from the "Devices" tab. The device id is shown in the "Identifier" entry. You may need to expand the Xcode window to see all of the uuid, its long and could be cut off.

3) Press Continue

4) Press Register.

 

Creating and Downloading the Development Profile

This is the final stage and will create the development provisioning profile you need to use when building your iOS standalone. Go to Profiles and select the "Development" tab from "All Types"-

1. Select New Profile (+)

2. Select "iOS App Development" and continue

3. Select the appropriate App ID for your application and continue

4. Select your development certificate and continue

5. Select the devices that you wish to be able to test your application on and continue

6. Give your profiles a name and then press "generate"

7. Select Generate.

8. Select the Download button from the next screen or from the Development Provisioning Profile you created.

This allows you to download the .mobileprovision file.

9. Double click the .mobileprovision install the Distribution Provisioning Profile on your computer.

You can now select this profile from the Standalone Builder when building your iOS application.

4 Comments

Red Deupree

One last comment - for anyone unfamiliar with the Apple environment, it is not obvious what app or site was active to make some of the screen shots.

Under each main topic heading it should say what site or app they are talking about, especially when showing screen shots not generated by LiveCode.

Elanor Buchanan

Thanks for the feedback Red, we'll get these updated.

Elanor

Mel Ellington

The directions above say:

"execute the following steps in your Keychain Access application:
1. Select Preferences > Certificates and ensure that Online Certificates Status
Protocol (OSCP) and Certificate Revocation List (CRL) are set to Off."

I'm using MacOS Mojave 10.14 and I don't see anything like that in my Keychain Preferences.

I see only two choices in Keychain Preferences: 1) Search directory services for certificates, and 2) Reset my default Keychains.

Next:
"2. Select Keys.
3. Highlight the private key associated with the distribution certificate."

I see no information there which informs me which "private" key is associated with the certificate.
I see "com.apple.kerberos.kdc" and "com.apple.systemdefault". Both have public and private key as their available "kind". Both allow me to export upon a right click. So which is the "key associated with the distribution certificate"?

Lastly, under the Certificates sidebar I see that my "Apple Worldwide Developer Relations Certification Authority" expires in February of 2023. I can only guess that means I have a valid provisioning profile for LiveCode to allow me to test my iOS app on my iPhones. However, I cannot get my simple (1 button, 1 label) Livecode app to show up in the Xcode 10.1 Simulator. The Simulator runs OK and I can push an Xcode sample iOS app onto it and it shows just fine in the iPhone 5s and 6s Simulators. In addition, in my LC standalone settings no provisioning profile shows up, other than some profile associated with some LC demonstration app that I downloaded and ran a few days ago: "IOS Team Provisioning Profile: Myorg.tabbed.app. How do I get rid of that profile and install my own provisioning profile? Frankly I have no idea where my provisioning profile is and why it doesn't show up in the standalone settings. It used to do so a couple of years ago and I could sideload apps on my iOS devices.

—ME

Elanor Buchanan

Dear Mel

It looks like the Keychain preferences might have changed since this lesson was written, we'll look into that and update the lesson.

2. Do the private keys you can see have an expander arrow next to them? If so you can expand the key and see the certificate the key is associated with.

3. If you have a valid certificate it should show up under certificates with the type of certificate and the name of the developer or team, for example I can see

iPhone Developer: LiveCode
iPhone Distribution: LiveCode

If you can't see any certificates similar to that they have not been successfully created and/or installed. The easiest thing to do is probably to log in to your Apple Developer account and see what the status of your certificates and provisioning profiles are. If you haven't used them for a couple of years they may well have expired and you will need renew and/or redownload them. If they are all valid you might just need to download and install them as described in the lesson.

I hope that helps.

Kind regards

Elanor

Add your comment

E-Mail me when someone replies to this comment