Repository navigation
Build App
In order to build the project for iOS, you only have to run the following script:
sh build_ios.shThis 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/wwwfolder - Copies necessary files from
publictocordova/platforms/ios/wwwand ignores redundant files and folders - Copies everything from
cordova/platforms/ios/platform_www/pluginstocordova/platforms/ios/www/plugins - Copies
cordova/platforms/ios/platform_www/cordova.jstocordova/platforms/ios/www - Copies
cordova/platforms/ios/platform_www/cordova_plugins.jstocordova/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.pyNote: 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
mobilotand 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.keystoreis 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. (zipalingis part of the Android SDK)
FINALLY
Execute: adb install Mobilot.apk, with a connected device, in order to install the application.