This project is for wrapping the Sujuvuusnavigaattori application inside a native application. Cordova also known as PhoneGap is used for this.
It is assumed that you are somewhat familiar with NodeJS and git. You should have them installed before proceeding with these instructions. Also install grunt: sudo npm install -g grunt-cli
.
- Cordova can be installed following Installing the Cordova CLI instructions in The Command-Line Interface chapter of the PhoneGap API Documentation.
- After installing Cordova you should open terminal / command line and move to directory where you want the Sujuvuusnavigaattori-wrapper to be put. In the directory where you moved, clone the Sujuvuusnavigaattori-wrapper, i.e. run the
git clone
command. Then to clone the Sujuvuusnavigaattori sub project runcd www
,git submodule init
, andgit submodule update --remote www
. - Now is good time to install platform tools. See iOS specific or Android specific help.
- After platform tools are installed you can run, for example
cordova build ios
orcordova build android
at the sujuvuusnavigaattori-wrapper root directory. However, before runnning those build comands, always when needed, update the contents of the www directory to the latest version: rungit submodule update --remote www
in the project root directory and rungrunt
in the www directory. - If there was any errors, ask help.
Cordova has good general iOS instructions, so you should see them. It should be possible to run cordova build ios
succesfully after following them. However, before creating application archive (.ipa) from Xcode, you should:
- Remember delete the node_modules and utils directory from the
sujuvuusnavigaattori-wrapper/platforms/ios/www
directory before opening the project in Xcode for archiving. Otherwise there may be validation error when trying to create archive. - Make sure in Xcode that target version and build are correct (for example, 0.1.1).
Cordova has also Android instructions. Few notes for installing Android tools for Mac:
- Install Android Studio
- Run Android Studio, select Configure -> SDK Manager. Install from Tools: Android SDK Tools, Android SDK Platform-tools, Android SDK Build-tools (19.1 and above). Install from Android 4.4W: SDK Platform. From Android 4.4.2: SDK Platform and Google APIs and Sources fro Android SDK. From Extras: Android Support Repository and Android Support Library.
export ANDROID_HOME="/Applications/Android Studio.app/sdk"
- Install ant
export PATH=${PATH}:/Applications/apache-ant-1.9.4/bin
Your help needed...