Koala survey collection mobile-app based on Ionic Framework / Angular.
Install the Ionic and Cordova CLI (note: you may need to have root access for this):
npm install -g ionic cordova@8.1.1 cordova-res cross-env
ionic cordova plugin add cordova-plugin-googlemaps --variable API_KEY_FOR_ANDROID="YOUR_ANDROID_API_KEY_IS_HERE" --variable API_KEY_FOR_IOS="YOUR_IOS_API_KEY_IS_HERE"This project contains submodules. To clone both the project and submodules, use:
git clone --recurse-submodules https://github.com/gaiaresources/koala-watchThen install node dependencies:
npm installSelect java version ( https://chamikakasun.medium.com/how-to-manage-multiple-java-version-in-macos-e5421345f6d0 , https://github.com/jenv/jenv , (gradle) https://reflectoring.io/manage-jdks-with-jenv/ ):
(if you don't have it)
brew install gradlejenv local
nvm usecordova plugin add cordova-android-support-gradle-release --variable ANDROID_SUPPORT_VERSION=27.0.0It may be necessary to remove the duplicate <uses feature="gps.location...
from the AndroidManifest.xml
To run the app in a browser, within the project directory use:
envs are prod or uat
sudo apt install gradle
cross-env ENV='uat' ionic serve
android:
cross-env ENV='uat' ionic cordova run android NOTE: you need to remove the duplicate location entries manually from /platforms/android/app/src/main/AndroidManifest.xml
envs are prod or uat
cross-env ENV='uat' ionic cordova build android OR
./android-build-uat.shThis app was deployed using XCode 9.4 (9F1027a)
Create the XCode project using the command below:
ionic cordova build iosThe XCode project should be located at
platforms/ios/Koala Watch.xcodeprojFix the XCode project app icons and splash images using the bash script makeIcons.sh
./makeIcons.sh*** 2021+ ***
ionic cordova platform rm ios
ionic cordova platform add ios
cross-env ENV='prod' ionic cordova build ios
go to ios folder:
https://stackoverflow.com/a/47107769 (maybe needs this)
In Xcode:
- Set the development team to Gaia Resources, from there the ios build command should succeed
- Drag the spash image Default-Portrait.png -> iPad Portrait Without Status Bar iOS 5,6 1x
- Drag the spash image Default-Portrait@2x.png -> iPad Portrait Without Status Bar iOS 5,6 2x
- Drag the spash image Default-Landscape.png -> iPad Landscape Without Status Bar iOS 5,6 1x
- Drag the spash image Default-Landscape@2x.png -> iPad Landscape Without Status Bar iOS 5,6 2x
Deploy to an iphone using the command:
ionic cordova run ios --deviceLog into the Apple Developer Portal and create a Distribution provisioning profile
- https://developer.apple.com/account/#/overview/
- Select application id Koala Watch
- au.gov.nsw.dpie.koalawatch
- Type is iOS Distribution
- Seletc App Store
- Select certificate Gaia Resources (iOS Distribution)
- Name it Koala Watch Dist
Open XCode, in preferences update the profiles, untick Automatic manage siging and select the Koala Watch Dist provisioning profile
Create an Archive and select to Koala Watch Dist provisioning profile