Building Android and iOS apps

Intro

Hosts, ESPs, ISPs, and Telcos can improve brand awareness by building their own branded Android and iOS apps and publishing them to the Google and Apple stores.

CrossBox Requirements

To build smartphone apps you need to have:

Building Requirements

Android

To build an Android app:

iOS

To build an iOS app:

Online App Builder

First, log into your crossbox.io account and go to Online App Builder.

 STEP ONE 

Create an App

Before you issue a new build request, you need to create a new app.

crossbox_new_app.png

In the new app wizard, you'll need to fill in:

Master Server

Choose for which master server you'll be building the app.

Obtain and upload Firebase config files

These are needed in order for native Android and iOS push notifications to work.

Now when you have them on your computer, attach them to the form and click the submit button.

crossbox_new_app_google_services_plist.png

 STEP TWO

Create a Build Request

After you've finished creating an app, you can proceed to issue a new build request by clicking the "New Build Request" button:

crossbox_new_build_request.png

This will offer you to choose which App you want to build and for what platforms:

crossbox_new_build_request_form.png

Click the submit button.

After the build process is done, you'll be able to download android.zip and ios.zip archives to your computer.

These archives contain both debug and release versions:

  • The debug version can be installed onto the devices without signing and is used for testing the app on a device.
  • The release version is a production-ready version which you need to sign and then publish to the respective app store.

 STEP THREE

Sign the Apps

Android 

Generate Keystore

You need to generate a Keystore (if you already don't have one) and use it to sign app-release-unsigned.apk

Use the keytool provided by the JDK found in %JAVA_HOME%/bin/

keytool -genkey -v -keystore my.keystore -keyalg RSA -keysize 2048 -validity 10000 -alias app

Sign

Android 7.0 introduces APK Signature Scheme v2, a new app-signing scheme that offers faster app install times and more protection against unauthorized alterations to APK files (See here and here for more details).

Therefore, Google implemented its own APK signer called apksigner.

The script file can be found in %ANDROID_HOME%/sdk/build-tools/latest version/ (the .jar is in the /libsubfolder).

Use it like this:

apksigner sign --ks my.keystore my-app.apk --ks-key-alias alias_name

The signed APK can be verified with:

apksigner verify my-app.apk

The official documentation can be found here.

iOS

For iOS, we provide the entire Xcode project at your disposal.

Before proceeding, please make sure you have the latest macOS operating system and the latest Xcode version installed, as required by Apple.

When deploying, make sure you enable the app capabilities as seen on screenshots and that your deployment profile has been setup:

Screen-Shot-2019-09-02-at-13.54.37.png

Enable app groups, and select your deployment profile:

Screen-Shot-2019-08-23-at-20.17.14.png

Repeat the process for both targets, and also check the checkboxes under app groups for both Targets (ShareExt and Your App):

Screen-Shot-2019-08-23-at-20.17.06.png

Finally, enable push notifications:

Screen-Shot-2019-09-02-at-13.53.42.png

Xcode will ask you for a profile that has joined the developer program.

After you've set this up, you can proceed with deploying the app to your device or Apple's App Store.

 STEP FOUR

Publish Apps to the Stores

Now that you have signed apps, they are ready to be published to the respective stores.

Android (Play Store)

Submit the Android app via the Play Store.

iOS (App Store)

Submit the iOS app via the App Store.

Known issues on IOS

If the build process in Xcode fails, you can try to fix it by:

  1. Installing cocoa pods on your machine - https://cocoapods.org/
  2. Correcting the build settings for the Swift version - make sure you select Swift Version 4 

Screenshot-2019-09-17-at-12.57.43-(1).png