Skip to content

Create Builds

doomsayer2 edited this page Dec 13, 2016 · 6 revisions

Gulp tasks

Use the following Gulp tasks from public/ to quickly bundle the app for production or during development and test files for correct annotation.

gulp

Create a single development-ready build.

gulp build

Create a single production-ready build.

gulp watch

To actively watch changes during development. This executes gulp build on every change.

gulp test

Run a simple test, whether your files are correctly annotated.

gulp clean

Clean up the bin/ directory.


Platform Builds

iOS

To build an iOS build run the following from the app directory:

sh build_ios.sh

Then, as usual, deploy the app to a connected device or the simulator with Xcode.


Android

To build an android apk or deploy it directly to a plugged device run the following from /:

build_android.bat

General:

  • If a device is plugged in, the app will be build and started on the smartphone. In order to check if a device is found, type adb devices, which will list all connected devices.
  • If no device is connected, the emulator of the android SDK will be launched.

Detail: The python script which is executed was tested w/ Python 2.7.12 and copies all necessary files to the cordova folder. Then the cordova build android --release command is performed, which creates an unsigned .apk file of the application.

After the script completed, the following steps must be made in order to build the final .apk:

NOTE: Windows used for building

  1. Take the .apk file and place it at the same spot where the Mobilot.keystore is located. (The password is “mobilot” and the alias “Mobilot”).
  2. Change the location of the command line to the place with the .apk and .keystore. There execute the following command jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore Mobilot.keystore android-release-unsigned.apk Mobilot.
  3. Verify that the .apk is signed by executing the following command jarsigner -verify -verbose -certs android-release-unsigned.apk.
  4. Align the application in order to reduce the amount of RAM usage it has. To do this execute the following command zipalign -v 4 android-release-unsigned.apk Mobilot.apk. (zipaling is part of the Android SDK)

FINALLY Execute: adb install Mobilot.apk, with a connected device, in order to install the application.

Clone this wiki locally