How to set up an iOS device and RAD Studio XE8 (Delphi, C ++ Builder)
Today we will “make friends” or configure a real iOS device and RAD Studio XE8 (or Delphi, or C ++ Builder, or Appmethod).
As a result, we will be able to run our applications not only in the Window, Android, OS X, iOS simulator environment, but also on real iOS devices from the same source code.
Action Plan:
- MacBook Setup + developer.apple.com;
- Configure RAD Studio XE8;
- Launch your application on an iOS device.
We already did some of the work on connecting a real iOS device in the last post when we set up Mac OS X and the iOS simulator (I strongly recommend that you familiarize yourself again). Earlier, we also learned how to configure Android devices and RAD Studio. And today we’ll talk about configuring iOS devices and RAD Studio.
In order to complete this task, I used:
- Dell Latitude E7240 (my laptop);
- MacBook Pro;
- usb cable;
- iOS device (or several);
- Apple Developer Certificate.
The setup process requires accuracy and patience. I will try to describe in detail all the steps step by step with screenshots.
- make sure that you have completed the setup of Mac OS X and RAD Studio XE8 ;
- connected their iOS devices via usb cables to the mabuk;
- make sure that the MacBook sees iOS devices, and the MacBook and PC with RAD Studio are on the same network.
I have this:
- laptop: Windows 8 64x + RAD Studio XE8;
- Macbook: OS X Yosemite 10.10.2;
- the laptop is connected via LAN to the router, and the macbook is connected via WiFi to the router, both are on the same network;
- iPhone 5, iPad 2, iPad mini, iPad Air 2.
Here the paths go alongside:
- if you are an individual developer, then register yourself and pay for the developer certificate yourself;
developer.apple.com/programs/ios
- if you are a corporate developer, your company must have a corporate account on developer.apple.com, contact your group administrator to add you there, before that you need to register on developer.apple.com and tell him your email.
Further in the text I will consider connecting iOS devices through a corporate account, but this is very similar to what an individual developer should do.
Each iOS device has its own identifier. To determine it, we connect iOS devices to the macbook, run xCode and through the Windows → Devices menu we get to a special form. Here in the list “Devices” all connected iOS devices are visible, click on each device and copy its identifier from the properties.
The list of iOS device identifiers will need to be communicated to the group administrator or to add them yourself to developer.apple.com.
On the macbook, launch the application “Programs” → “Utilities” → “Keychain”.
Using the menu “Keychain” → “Certification Assistant” → “Request a Certificate from a Certification Bureau” we create our public key by going through the setup wizard.
We will need this file soon.
We see that the “Keychain” has changed.
We go to developer.apple.com, click on “Certificates, Identifiers & Profiles”, and then in the new form that appears, click on “Certificates”.
Next, go to the page for adding an iOS certificate and go through the settings wizard.
Click on the “Choose File ..” button and select the newly created public key. Next, click on the “Generate” button.
After that, our certificate will appear in the list of certificates, which will wait for confirmation from the group administrator.
At this stage, you need to contact the group administrator and report confirmation of the certificate. We are waiting for confirmation.
From the list of all certificates we find our “iOS Certificate”, which by this moment should pass confirmation and click on the “Download” button.
The file is saved in macbook downloads. Next, double-click to start the installation process.
In the “Keychain” we make sure that the certificate is installed.
From the Macbook, go to developer.apple.com and then to the “Certificates” tab.
Download the “iOS Team Provisioning Profile” by clicking on the “Download” button (you need to check with your group administrator which profile to download).
The file is saved in macbook downloads.
Next, open xCode, right-click on the desired device and select “Show Provisiong Profiles ...”.
Most likely, you will see an empty form, click on the small plus sign on the left at the end of the list.
The recently downloaded “Provisioning Profiles” file is located in the “Downloads” folder and click “Install”.
After installation, we will see our added profile.
For all iOS devices, repeat this point.
Now switch to RAD Studio.
We launch RAD Studio and create a new project “Multi-Device Application”. We turn our eyes to “Project Manager”, open the “Target Platforms” list, find “iOS Device 32 - bit”, right-click on it and select “Properties ...” from the drop-down list.
I draw your attention to the fact that we configured the MacOS profile in a previous post , so now we only configure the SDK.
Check the SDK version and profile name.
Next, the installation process will begin.
After the installation is complete, we get this form, click OK on it.
If necessary, repeat the same steps for “iOS Device 64 - bit”.
Now in the “Target Platforms” group we find “iOS Device 32 - bit”, then in “Target” we select our device, double-click to make a selection. If the devices do not immediately appear, right-click on “Target” and on “Refresh”.
Then we start the assembly of the project, we turn our eyes to the MacBook and wait for the request to use the key. As soon as the message appears, feel free to click on the button “Always allow”.
After some time, the created application should start on the iOS device.
We repeat the same thing for other iOS devices.
That's all.
I hope this post will be useful to you and help you open new horizons.
Thank you all, good luck and, of course, a lot of patience. :)
UPDATE1 :
During the writing of the article, several updates came out, as a result, now I have installed software with such versions, where everything also works flawlessly:
- RAD Studio XE8 update 1;
- OS X 10.10.5;
- all iOS devices since 8.4.1.
UPDATE2
- replaced "MacOS" with "Mac OS X"
As a result, we will be able to run our applications not only in the Window, Android, OS X, iOS simulator environment, but also on real iOS devices from the same source code.
Action Plan:
- MacBook Setup + developer.apple.com;
- Configure RAD Studio XE8;
- Launch your application on an iOS device.
We already did some of the work on connecting a real iOS device in the last post when we set up Mac OS X and the iOS simulator (I strongly recommend that you familiarize yourself again). Earlier, we also learned how to configure Android devices and RAD Studio. And today we’ll talk about configuring iOS devices and RAD Studio.
In order to complete this task, I used:
- Dell Latitude E7240 (my laptop);
- MacBook Pro;
- usb cable;
- iOS device (or several);
- Apple Developer Certificate.
The setup process requires accuracy and patience. I will try to describe in detail all the steps step by step with screenshots.
1. Preliminary preparation.
- make sure that you have completed the setup of Mac OS X and RAD Studio XE8 ;
- connected their iOS devices via usb cables to the mabuk;
- make sure that the MacBook sees iOS devices, and the MacBook and PC with RAD Studio are on the same network.
I have this:
- laptop: Windows 8 64x + RAD Studio XE8;
- Macbook: OS X Yosemite 10.10.2;
- the laptop is connected via LAN to the router, and the macbook is connected via WiFi to the router, both are on the same network;
- iPhone 5, iPad 2, iPad mini, iPad Air 2.
2. Register an iOS developer with Apple.
Here the paths go alongside:
- if you are an individual developer, then register yourself and pay for the developer certificate yourself;
developer.apple.com/programs/ios
- if you are a corporate developer, your company must have a corporate account on developer.apple.com, contact your group administrator to add you there, before that you need to register on developer.apple.com and tell him your email.
Further in the text I will consider connecting iOS devices through a corporate account, but this is very similar to what an individual developer should do.
3. Identification of identifiers of connected iOS devices.
Each iOS device has its own identifier. To determine it, we connect iOS devices to the macbook, run xCode and through the Windows → Devices menu we get to a special form. Here in the list “Devices” all connected iOS devices are visible, click on each device and copy its identifier from the properties.
The list of iOS device identifiers will need to be communicated to the group administrator or to add them yourself to developer.apple.com.
4. Create a public key (certSigningRequest).
On the macbook, launch the application “Programs” → “Utilities” → “Keychain”.
Using the menu “Keychain” → “Certification Assistant” → “Request a Certificate from a Certification Bureau” we create our public key by going through the setup wizard.
We will need this file soon.
We see that the “Keychain” has changed.
5. Create a certificate.
We go to developer.apple.com, click on “Certificates, Identifiers & Profiles”, and then in the new form that appears, click on “Certificates”.
Next, go to the page for adding an iOS certificate and go through the settings wizard.
Click on the “Choose File ..” button and select the newly created public key. Next, click on the “Generate” button.
After that, our certificate will appear in the list of certificates, which will wait for confirmation from the group administrator.
At this stage, you need to contact the group administrator and report confirmation of the certificate. We are waiting for confirmation.
6. Installing the certificate.
From the list of all certificates we find our “iOS Certificate”, which by this moment should pass confirmation and click on the “Download” button.
The file is saved in macbook downloads. Next, double-click to start the installation process.
In the “Keychain” we make sure that the certificate is installed.
7. Setting up “iOS Provisioning Profiles”.
From the Macbook, go to developer.apple.com and then to the “Certificates” tab.
Download the “iOS Team Provisioning Profile” by clicking on the “Download” button (you need to check with your group administrator which profile to download).
The file is saved in macbook downloads.
Next, open xCode, right-click on the desired device and select “Show Provisiong Profiles ...”.
Most likely, you will see an empty form, click on the small plus sign on the left at the end of the list.
The recently downloaded “Provisioning Profiles” file is located in the “Downloads” folder and click “Install”.
After installation, we will see our added profile.
For all iOS devices, repeat this point.
Now switch to RAD Studio.
8. Setting up the SDK for iOS devices.
We launch RAD Studio and create a new project “Multi-Device Application”. We turn our eyes to “Project Manager”, open the “Target Platforms” list, find “iOS Device 32 - bit”, right-click on it and select “Properties ...” from the drop-down list.
I draw your attention to the fact that we configured the MacOS profile in a previous post , so now we only configure the SDK.
Check the SDK version and profile name.
Next, the installation process will begin.
After the installation is complete, we get this form, click OK on it.
If necessary, repeat the same steps for “iOS Device 64 - bit”.
9. Confirmation of the use of the key for signing.
Now in the “Target Platforms” group we find “iOS Device 32 - bit”, then in “Target” we select our device, double-click to make a selection. If the devices do not immediately appear, right-click on “Target” and on “Refresh”.
Then we start the assembly of the project, we turn our eyes to the MacBook and wait for the request to use the key. As soon as the message appears, feel free to click on the button “Always allow”.
After some time, the created application should start on the iOS device.
We repeat the same thing for other iOS devices.
10. And now the traditional “family photo”.
That's all.
I hope this post will be useful to you and help you open new horizons.
Thank you all, good luck and, of course, a lot of patience. :)
UPDATE1 :
During the writing of the article, several updates came out, as a result, now I have installed software with such versions, where everything also works flawlessly:
- RAD Studio XE8 update 1;
- OS X 10.10.5;
- all iOS devices since 8.4.1.
UPDATE2
- replaced "MacOS" with "Mac OS X"