-
Notifications
You must be signed in to change notification settings - Fork 1
Build App
In order to build the project for iOS, you only have to run the following script:
sh build_ios.sh
This will do a few things for you:
- Run production build gulp task:
gulp build
- Copy files for Cordova iOS:
python cordova_prepare_ios.py
- Create iOS build:
cordova build ios
- Open Xcode so that you may press Play
python cordova_prepare_ios.py;
Note: Tested w/ Python 2.7.9
The python script does the following:
- Empties the
cordova/platforms/ios/www
folder - Copies necessary files from
public
tocordova/platforms/ios/www
and ignores redundant files and folders - Copies everything from
cordova/platforms/ios/platform_www/plugins
tocordova/platforms/ios/www/plugins
- Copies
cordova/platforms/ios/platform_www/cordova.js
tocordova/platforms/ios/www
- Copies
cordova/platforms/ios/platform_www/cordova_plugins.js
tocordova/platforms/ios/www
Note: This may change in the future !
In order to build the project for Android, the following python
script has to be executed:
python cordova_prepare_android.py
Note: Tested w/ Python 2.7.12
The script copies all necessary files into cordova/www
and not into the platforms
folder. The files need to be located there as the default index.html
and .js
files are replaced with the content of this folder, upon building the platform.
After the script completed, the following steps must be made in order to build the final .apk:
NOTE: Windows used for building
- Navigate to the project folder of the whole project, in the command line. In this case
mobilot
and there tocordova/plattforms/android
. - In this folder execute the following command
cordova build --release android
. This will create an unsigned .apk file. - 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”). - 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
. - Verify that the .apk is signed by executing the following command
jarsigner -verify -verbose -certs android-release-unsigned.apk
. - 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.