An Apple developer certificate is needed in order to run the code on a physical iPhone and iPad. Apple Mac machine and membership in Apple Developer Program ($99/year) are needed to generate P12 certificate and to submit your apps to the AppStore. It is possible to generate the certificate using “free” Apple developer account on macOS with Xcode 7, but you will not be able to submit your application to AppStore using this certificate.

Go to macOS machine, open Xcode, open the Accounts preferences pane, and check whether your Apple ID is registered. If it’s not listed, click “+” button to add it.

Make sure that you have a valid signing identity and provisioning profiles. Choose your account in the accounts preferences pane and click on “View Details”.

To export P12 certificate, start the Apple Keychain Access* application by opening the Applications folder and choosing the Utilities option.

Select the Apple certificate to be exported, click File in your Apple menu and select Export Items from the drop-down menu.

In the Save As field, enter a name for the Export p12 file. Enter a password for your p12 file (1 character minimum). Click OK.

Copy the downloaded p12 file to your Windows* system so you can use it to configure MOE remote build.

You can create multiple Ad Hoc provisioning profiles depending on the testing devices to be used. Typically, create one or more for ad hoc testing purposes. Later, create a production provisioning profile for the final Apple AppStore distribution.

The next screen allows you to create the development certificate. To do this, press the Create button next to the iOS development text. Once this process has completed, press Done.

Now you can find the generated development certificate in “Keychain Access” program.

Now connect your iOS* device to the macOS machine. Create new project for iOS* using Xcode* project wizard (File -> New project). Enter the Product name, Organization Name and Organization Identifier sections, press Next and save your project. You should see the following screen:

Select your iOS* device from the target selection drop-down menu. Press the “Fix Issue” button to create the provisioning profile for your device. Press the “Play” icon to build the project and deploy the application to device to ensure that everything is set up correctly.

It’s possible that the first time you get message “process launch failed: security”. It indicate that provisioning profile was not approved by device. To fix it you should go Settings -> General -> Profiles and mark corresponding profile trusted. To save the development certificate as .p12 file, go to Keychain Access, select the certificate, open the arrow to also select the private key and export them together as a .p12 file. To find the provisioning profile, go to Xcode* -> Preferences -> Accounts -> View Details. right click on the provisioning profile with required Bundle ID and select “Show in Finder”.