09 May 2019

How to compile manually iOS apps?

To know before publishing

Xcode and MacOS

To publish an iOS app you need a Mac computer because you must use Xcode software. Actually you can do that without a Mac computer but you have to emulate your computer to install Mac OS and then install Xcode on Mac OS. Here is an article about that:
https://www.udemy.com/blog/xcode-on-windows/

 

The certificates

An iOS publication under one developer account needs 4 files, one file that will sign the certificates and 3 certificates. The file that will sign the certificates and one of the 3 certificates are used for all apps published under one developer account, and the two other certificates must be created each time you will publish a new app.
The ones that are used for all apps published under one developer account:
These 2 files will be created once (the first time you are going to publish under this developer account). It is the CertSigningRequest (CSR) and the iOS distribution certificate (iOS_Distribution). The CSR is created from your computer (must be a Mac) from the Keychain Access, and the iOS_Distribution is created from the Member Center at developer.apple.com.
These two items must be stored in the main certificates folder for this developer account on your computer (it will be better in term of organization if you are willing to publish other apps under this account). Thus if we consider this example, for the client named “John Doe” who has his own developer account, on your computer there will be these folders with this organization:

  • IOS apps
    • John Doe
      • Certificates –> CSR and iOS_Distribution for John Doe account must be stored here after you have created them
      • John Doe 1st app
        • Certificates
        • Screenshots

You will use this CSR and iOS_Distribution certificate for all the apps that you will publish for John Doe, if there are several apps to publish under this account. You create once and you use them each time you publish an app for John Doe under his account. For your information, the Keychain Access to create the CSR is in your Mac in Applications > Utilities.

The two other certificates are the Apple Push Services certificate and the Mobile Provisionning Profile. You will have to create them for each app, as you can see in the video. You will stored them in the certificates folder which is in the app folder. Thus if we consider the previous example, for the client named “John Doe” who has his own developer account:

  • IOS apps
    • John Doe
      • Certificates
      • John Doe 1st app
        • Certificates –> Apple Push Services certificate and Mobile Provisionning Profile for John Doe 1st app must be stored here after you have created them
        • Screenshots

 

To create screenshots

You will need some screenshots to fill out the app sheet on iTunes. You will be able to make them with Xcode and especially with the iOS Simulator delivered with Xcode. Open the Xcode project that is in the ios_source folder (see in the video when opening the project with Xcode), then choose the target, iPhone 8 Plus for instance, and click on the Play button (For your info, the ios_sources of an app can be downloaded from its page from your app editor > Publication > MOBILE SOURCE CODES):

App Screen-Shot

Take some screenshots of the app for this target using CMD+S from your keyboard, and do it for each target you want screenshots. Before switching from a target to another don’t forget to click on the “stop” button in Xcode.

Take some screenshots of the app for this target using CMD+S from your keyboard, and do it for each target you want screenshots. Before switching from a target to another don’t forget to click on the “stop” button in Xcode.

Step to compile an iOS app

Create the items related to the developer account with which you are going to publish

You have to create a CSR file and an iOS Distribution certificate. And you will be able to use these items for all of the next apps you will have to publish under this developer account –> keep them preciously once created.

The CSR File

It must be created from the keychain access tool of your Mac. Open it from Applications > Utilities > Keychain Access:

Keychain Access

From the menu select “Keychain access” > “Certificate Assistant” > “Request a Certificate From a Certificate Authority”:

Request certificate

In the window that opens, enter the email of the developer account (or any other email address, it doesn’t have any impact), and enter the name of your developer account, and select “Saved to disk”:

Certificate

Save this CSR to your disk, in a folder related to the certificates of your developer account.

Close the window.

 

The iOS distribution certificate

– Connect at https://developer.apple.com/membercenter/index.action with the developer account

– Click on “Certificates, Identifiers & Profiles”

iOS distribution certificate

– Click on “Certificates”  in the menu on the left, then click on +:

certificates

– Choose “iOS Distribution (App Store and Ad Hoc)” and click on “Continue”:

certificates2

– Sign your iOS Distribution certificate with the CSR file you have created before.

– Download the iOS Distribution certificate that has been created.

– Double click on the iOS Distribution certificate (ios_distribution.cer) to add it to the Keychain Access.

Create the items related to the app you are going to publish

The Apple push service certificate

Thanks to this certificate you will be able to add push notifications, in-app purchase, and other services to your app. In our case, only the push notification service is interesting.

– Click on “Identifiers” in the menu on the left, then click on plus:

 

identifiers

– Choose “App IDs” and click on “Continue”:

identifiers2

– Enter your app name, the Bundle ID of the app:

app-id

– Go below and select “Push Notifications” in the list of “Capabilities“:

app-id2

– Click on “Continue“.

– Then click on “Register“.

– In the list, find the App ID you have just created and click on it.

– Go at the bottom and for Push Notifications, click on “Configure”:

app-id3

– In  “Production SSL Certificate” section click on “Create Certificate”:

push-notification

– Click on “Choose File” and upload the CSR file you have created before for this developer account (the same CSR you have used to create the iOS Distribution certificate for this developer account):

new-certificate

– Download the Apple Push Services certificate (aps.cer) that has just been created. Store this certificate in a folder related to this app on your Mac.

new-certificate2

– Click on “< All Certificates“.

-Double click on the Apple Push Services certificate (aps.cer) to add it to the Keychain Access.

The provisioning profile

 

– Click on “Profiles” in the menu on the left, then click on plus:

profiles

– Choose “App Store” under “Distribution“:

profiles2

– Select the App ID of your app, and click on “Continue”:

profiles3

– Select the iOS Distribution certificate associated to the CSR you have used to sign the Apple Push Services Certificate you have created just before (it is very important to use the iOS Distribution which has been created with the CSR used to sign the aps.cer of this app. Don’t forget it, and don’t forget that in case you create a new aps.cer for this app with another CSR you will have to create a new provisionning profile too with the iOS Distribution certificate made with this CSR, and then to publish an update of your app on the App Store)

profiles4

– Click on “Continue“.

– Name the Provisionning Profile and click on “Continue”

profiles5

– Download the Provisionning Profile that has just been created. Store this certificate in the folder related to this app on your Mac, and which contains the Apple Push Services certificate created just before.

profiles6

Compiling the app

– Download your iOS source code

– Unzip the folder and open the .xcworkspace file by double-clicking it

– Follow this video:

Note: you must first create your app on App Store Connect before sending the build with Xcode (Step 1 > 3 of this documentation).

Creating the .pem certificate

– Go in the Keychain Access on your Mac

– From the left menu, select “Certificates”

select certificates

– In the search bar at the upper right, enter the bundle ID of your app (you can find it in your app editor in the Publication tab -> GENERAL INFORMATION -> Bundle ID)

– Click on the arrow on the left of your “Apple Push Services” certificate, a private key must be attached under it

apple push1– Select the private key and the certificate

– Right-click on them

– Select “Export 2 items…”

apple push2

– Choose your desktop as the destination (it can be another location but you will have to adjust the code we will give you after)

CERTIFICATES

– Choose a password of your own

password

– Open the Terminal console of your Mac (From Applications > Utilities > Terminal)

– In the Terminal, be sure to be located on your desktop (you must have “Desktop” displayed and then your username)

terminal-1

Enter this command:

“openssl pkcs12 -in Certificates.p12 -out certificat.pem -nodes -clcerts”

(If the terminal answers that there is no file named “Certificates.p12”, go on your desktop and check what is the name of this certificate .p12, and enter this name rather than Certificates.p12 in the command line)

terminal-2

– Enter the password you have used just before to export your certificate on your desktop

terminal-3

– On your desktop you have now two certificates: a Certificates.p12 and a certificat.pem.

desktop

– Move these files to the folder of your app on your Mac (with the provisionning profile and the aps.cer)

app folder

– Send this certificat.pem to radioapps.eu technical service.

– You’re done!

Share this
09 May 2019

Overview of publishing application

This guide answers common questions about publishing and distributing apps

Requirements to publish an application to the App Store:

To distribute an application on the App Store, you need to subscribe an Apple Developer account. The Apple Developer Program annual fee is 99 USD.

If you don’t already have an Apple Developer account you can subscribe your account here: https://developer.apple.com/programs/enroll//

This service does not support Double Authentification. You have to create your apple developer account from a desktop and not from an Iphone or an Ipad.

Once you’ve completed your enrollment in the Apple Developer Program, you can sign in to iTunes Connect with the Apple ID you used to enroll. iTunes Connect is where you manage your App Store apps, see your sales reports, manage your iTunes Connect users and testers, and more.

For more information about the complete process use the link below: https://itunespartner.apple.com/en/apps/overview

 

The process of publishing:

There are two options to distribute an application on the App Store:

I – The manual method

You have a minimal technical knowledge and you want to publish yourself your application manually. In this case, take the following steps:

1. First you need to generate in your app editor the sources code of your application.
Connect to your app editor, select the Publication tab, scroll down until  GENERATE THE SOURCE CODE and choose the iPhone Version if you have ads in the app or iPhone Version (No Ads) and generate the source code.

Your request enters the queue and is going to be generated, then a link appears to download the generated sources code.

2. Then you have to use an Apple software called Xcode to compile yourself the concerned sources code in the aim of generating your application. Of course, you need to have a Mac to be able to use Xcode.

Xcode_icon

You can download this software here: https://developer.apple.com/xcode/

To find more information about how to use Xcode in the aim of generating your application, please read this article:

https://radioapps.eu/how-to-compile-manually-ios-apps/

II – The automatic method

We can submit your app to the App Store automatically with our auto-publishing service called “iOS Auto-publish“. This method doesn’t require any technical knowledge.

Note: Unfortunately you can’t use the iOS Auto-publish if you have an Apple account that is “Individual”. Before using this service, please check that your Apple account is not “Indidivual”.

Here are the steps to publish your app with this service:

Prepare your App Store Connect account

Apple accounts requires to have the 2 factor authentification activated, but only for the owner of the account. Therefore we will add a new member to the Apple account:

  1. Log in App Store Connect account, then open the “Users and Access” section:

iTunes account

2. Click on the to invite a new user by email. Pick one of your email addresses, it must not be linked to an Apple account already:

new user

Note: Be careful to set Admin as Role, All Apps and Access to Certificates, Identifiers & Profiles, otherwise we will have issues while publishing the app.

3. From your mailbox, accept the invitation and create your new apple account.

4. Log in App Store Connect with this new account and accept any licenses. (if you have any licences to accept, it generates an issue during the publication)

5. From the “Users and Access” section, you should see this:

user access

main@radioapps.eu is the Account Holder (your main account), which is protected by the 2 factor authentification,
john.robinson@mailbox.com is the new account with Admin role.

6. Log in Apple Developer with the new account, and note your “Team Name” and your “Team ID”:

developer

In order to publish your app on your App Store developer account you must to send us this informations:

Your App Store Connect login and password

Your Apple Development Team ID, 

Team name and App Store Connect provider.

 

Share this
Click Me