After several challenging interactions with the process of creating mobile apps for the Apple store, I have decided to ease my pain by writing it down and at the same time share it with the community. I will also use this opportunity to introduce Apple Test Flight as a way to test your iOS applications.

Are there other ways of doing this? Probably, but this one is going to be documented! And until Apple or OutSystems updates their process, this is the path I will be taking!

Build your mobile app in OutSystems

This is the easiest step! OutSystems provides the possibility to build native mobile applications that can be uploaded to the mobile stores.

Everything starts with this screen:

OutSystems Service Studio New Application display

After selecting the type of app you want to develop, you just need to pick the template, set a name and an icon and you are ready to go! If you don’t know how to build a mobile application in OutSystems, you can follow the OutSystems University and learn. Later you can complement your knowledge with official documentation.  If you have questions and want to know even more, you can always join the community and use the forums.

As soon as the application is ready to be tested on a device, you need to set the configurations for the supported native platforms (iOS and Android). In order to get all the necessary information you need to enroll into the developer programs of Apple and Google. Google’s program is very straight forward, it will cost you $25 and then you can manage and upload your apps without further costs. Because the process that surrounds iOS is more complex (from managing the certificates, provisioning profiles and uploading the application to the store) I will dedicate the rest of this article explaining how you can achieve it.

How to enroll in the Apple Development Program?

The Apple Development Program is available for organisations ($299 per year) and for individuals ($99 per year). You can find more about these two options here. Independently of your choice you have to have an Apple Id with the two-factor-authentication turned on (one of the latest changes). You will also need to have access to an OSX machine to push the application (ipa file) to the store, but I’ll get into that further down.

After enrolling in the program of your choice, you can access your account at the apple developer website.

Apple Developer login screen

For the scope of this article I will use the individuals developer account.

Know your way around the Apple console

On successful login you should see the following page:

Apple Developer console

To develop and distribute a mobile application in the Apple store you need to have an Apple-issued digital certificate so that the Apple systems can identify who signed the app. Choose the Certificates, Identifiers & Profiles option and you will be redirected to a page where you will be able to manage all the necessary files and configurations.

Start by selecting the Certificates menu entry and click on the top right +. You will be able to generate the certificate for your development environment. Here you face the first hurdle! If you want to test with a set of terminals that you already know and can get their UDID number, you can select iOS App Development and when you are configuring the Provisioning Profile you can select the devices that are authorized to install and run the application. If you have a large spectrum of test users and/or don’t know which devices they have, you should select App Store and Ad Hoc and then use Test Flight for your app testing.

Today I am going to use option App Store and Ad Hoc, and use Test Flight because it’s a simple and easy way to select a group of people to do tests on your application.

So, back to the console! You should select App Store and Ad Hoc radio button and click the button Continue to upload the Certificate Signing Request (CSR) file. Now you are presented with an explanation of how to generate that file if you are using a Mac. However, if you are a Windows user like me, this explanation will only take you to Disneyland! To move forward you need to download and install the latest version of openSSL. There are a set of commands that you need to run in order to generate the Certificate Signing Request file.

After downloading openSSL, open a command line and go to the openSSL bin folder. You will now be running a set of commands where the first one is to set the OPENSSL_CONF variable:

set OPENSSL_CONF=c:\OpenSSL-Win64\bin\openssl.cfg

And then the generation of the private key:

openssl genrsa -out mykey.key 2048

To be able to generate the CSR you’ll have to run the following command using the email address of your apple developer account, the name of the account and the country ISO ALPHA 2 code:

openssl req -new -key mykey.key -out CertificateSigningRequest.certSigningRequest -subj “/emailAddress=<email of the apple developer account>, CN=<name of the account>, C=<country ISO ALPHA 2>”

With the CertificateSigningRequest.certSigningRequest file you can return to the Apple console and upload it. By clicking Continue you will generate the certificate (ios_distribution.cer) that you need to download and save locally. You will be using it right away!

Go back to the command line, and run these 2 commands to generate the p12 file:

openssl x509 -in ios_distribution.cer -inform DER -out ios_distribution.pem -outform PEM

openssl pkcs12 -export -inkey mykey.key -in ios_distribution.pem -out ios_distribution.p12

The last command will ask you to set a password. Save all this data because you will be using it on the configuration in OutSystems.

Go back to the Apple console for the last two steps:

1. Register an iOS App ID

When you are choosing a name for your application, you should select an App ID Description (basically the name you gave to your app) and the App ID Suffix can be either Explicit App ID (when you want to create a name for one app) or Wildcard App Id (when you want to use a single App ID to match multiple apps).

Choose the app services that are part of your application (none of them are mandatory) and finish this part by clicking in Register.

2. Create a Provisioning Profile

Now, as a final step, you have to create the Provisioning profile by selecting the radio button App Store under Distribution (you need the profile not only to use Test Flight but also later on when pushing the app to the store). Hit the button Continue and select the application. Continue again and choose the Certificate. Give a name to your Provisioning Profile and download it. You will be using it on the next step!

You have finished all the actions needed on the developer console. The next configurations will happen on itunes connect.

Create and configure the app on the Apple Store

As you can probably imagine by now, this next task is like the ones above! Not a sweet ride in the park 🙁

First you need to create your application on the itunes connect website. This will allow you to upload and manage all the builds of your app. For example, you can have two uploaded builds, one already in production and one still in test phase with Test Flight.

Go to MyApps and click on the + on the left corner and select New App. You will see the following screen:

Create a new App

After this you are ready to upload your app and manage the release cycle from test to production as soon as the builds are uploaded — a task that I will explain next.

Configure your mobile app in OutSystems

In order to upload the app you have to generate it first. For that you need to use all the data you have been gathering so far.

Go back to Service Studio, click on your application and choose the tab NATIVE PLATFORMS.

Service Studio — Application view

When you click on the button CONFIGURE IOS APP you’ll have access to a menu where you’ll be able to configure and generate the app. You have all the information needed for this part:

Service Studio — Configure iOS App

Click on the Generate App button and wait a few moments to see the QR Code with the link from where the app can be downloaded.


QR code with a link for app distribution

Now that you have the ipa file, let’s upload it to Apple.

Uploading the ipa file

You are on your Mac (or as a Windows user you can find a virtual machine here) and you have just downloaded the Xcode and opened it. Go to the top menu and under Xcode choose Open Developer Tool > Application Loader.

Application loader login

Here you need to use your Apple Id as your username and a unique password that you need to get on (on your account area and under APP-SPECIFIC PASSWORDS, you are able to set a password to use on the Application Loader).

After a successful login, upload the ipa file and follow the instructions. Apple will run a set of validations for you. If something is not correct, this process will let you know 😉

When this last step is successfully finished, you will be able to see that build on the apple connect web site.

iOS Builds view

Finally you are ready to go! Connect the build on Test Flight with your tester group and send the invite email. They will be able to download and install the app.

Wrap up

While I was writing this article I had the opportunity to test this run-through again with a couple of apps, from different clients, that needed to be delivered. This also allowed me to include different scenarios since the apps had several nuances on the use case. Unfortunately this is not an easy process, but I truly hope that this run-through/tutorial will help you the way it helps me. If you have a more stream-lined method of setting an OutSystems app on the App Store, please let me know. Only by sharing knowledge will we all be able to grow.