An opinionated skeleton for Cordova apps.
Dependency management is handled by Bower; to install dependencies:
bower install
Use Grunt to compile the app's assets. Install Grunt locally to the project as follows, you should have grunt-cli installed globally:
npm install
Start the Grunt watcher simply by issuing:
grunt
The app should always be compiled using the bundled build.sh script. This script will ensure that the app is built correctly and cleanly.
build.sh <platform> <environment> <version>
- Platform can be one of:
iosorandroid - Environment can be one of:
prod,stageordev - A version number is required if building for:
prodorstage
To install on an iOS devices, perform the following:
- Open the Xcode project (located at
dist/platforms/ios/*.xcodeproj) - Use Xcode to deploy to a local device
To distribute to testers, perform the following:
- Open the Xcode project (located at
dist/platforms/ios/*.xcodeproj) - Archive the project
- Submit to Apple
- In iTunes connect send invite to testers
To install on Android devices, perform the following:
- Connect device, ensure it is USB debugging mode.
- Use the Android SDK to compile the device onto the device.
To distribute to testers, perform the following:
- Distribute the APK which is available at
dist/platforms/android/build/outputs/apk/to users
- If necessary, create a new release using
git flow - Compile the app
./build ios <environment> <version> - Open up Xcode
- Set the build number appropriately for the version
- Create an Archive
- Validate and upload to the App Store
- Submit for TestFlight/review
Ensure that you have copied build.json.default to build.json and set the passwords.
- If necessary, create a new release using
git flow - If necessary, bump the version code in config.xml
- Compile the app
./build ios <environment> <version> - Upload
dist/platforms/android/build/outputs/apk/android-release.apkto Google Play
To sign the app you need to generate a keystore and update it's details in build.json:
keytool -genkey -v -keystore KEYSTORENAME.keystore -alias KEYSTORENAME -keyalg RSA -keysize 2048 -validity 10000
You'll need to use the GUID for the provisioning profile in build.json, which can be found at:
~/Library/MobileDevice/Provisioning\ Profiles/