The journey of an OutSystems mobile app into the Apple store

João Sousa
JETOfficial
Published in
8 min readMar 22, 2019

After some challenging interactions with the process of generating mobile apps and put them on 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 use also 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 you us with the possibility to built native mobile applications that can be uploaded to the mobile stores.

Everything starts in this screen:

OutSystems Service Studio New Application display

After selecting the type of app 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 how to and then complement your knowledge with the 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 you have the application 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 needed information you need to enroll into the developer programs of Apple and Google. The Google one is very straight forward, costs you 25$ once and 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 Enterprises (299 UDS per year) and for Individuals (99 USD per year). You can find more about this two options here. Independently of your choice you have to have an Apple Id with two-factor-authentication turned on (this is actually one of the latest changes). Also you have to have access to an OSX machine in order to be able to push the application (ipa file) to the store, but I’ll get into that further down.

After enrolling in a 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 in the Apple console

On successful login you should be able to 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 largest spectrum of test users and/or don’t know their devices, you should select App Store and Ad Hoc and then use Test Flight for your app testing.

For this article 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. At this moment you are presented with an explanation how to generate that file if you are using a Mac. However, if you are a Windows user like me, that 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 be running now 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 (not only for Test Flight to be used, but also for latter push 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 an 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 appleid.apple.com (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 we will all be able to grow.

--

--

João Sousa
JETOfficial

OutSystems Architecture and Delivery Specialist @ Accelerated Focus | OutSystems MVP