- Install Cordova
sudo npm install -g cordova
- Install Ionic
sudo npm install -g ionic
- Check your node.js version. Should be 0.12.0
node -v
-
Install XCode (only for Mac OS) for the builds for iOS platform
-
Install Android SDK for the builds for Android platform (instruction is different for every platform)
-
Clone the project
git clone https://github.com/pouria3/paralign
- Install dependencies
cd paralign &&
npm install &&
bower install
ionic serve
Connect a device to your machine
- Go to XCode
- In top bar 'Product' -> 'Run'
- Run
ionic run android --device
- Debug
- open Google Chrome
- go to
chrome://inspect
- choose the connected device
- Add platform (skip if it is already done)
ionic platform add android
- Change the version of code in the config.xml
<widget id="..something.." android-versionCode="1"...
- Build:
cordova build --release android
- Signing
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore paralign-android-release-key.keystore ./platforms/android/build/outputs/apk/android-release-unsigned.apk mykey
alias: mykey
pass: 123456
- Zipping
zipalign -v 4 ./platforms/android/build/outputs/apk/android-release-unsigned.apk ../paralign.apk
or
~/android-sdk-macosx2/build-tools/22.0.1/zipalign -v 4 ./platforms/android/build/outputs/apk/android-release-unsigned.apk ../paralign.apk
- You can find
../paralign.apk
file which you can upload to Google Play
cordova build --release android &&
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore paralign-android-release-key.keystore ./platforms/android/build/outputs/apk/android-release-unsigned.apk mykey &&
~/android-sdk-macosx2/build-tools/22.0.1/zipalign -v 4 ./platforms/android/build/outputs/apk/android-release-unsigned.apk ../paralign.apk
- Add platform (skip if it is already done)
ionic platform add ios
- Change the version of code in the config.xml
<widget id="..something.." ios-CFBundleVersion="1"...
- Build
ionic build ios
-
In Xcode:
-
'General' -> 'Identity' -> 'Team' choose team
-
'General' -> 'Deployment Info' -> 'Devices' set only 'iPhone'
-
'Build Settings' -> 'Build Options' -> 'Enable Bitcode' set all fields 'no'
-
In top bar 'Product' -> 'Archive'
-
In window 'organizer' choose the archived build and press the button 'Upload to App Store...'
-
In the next windows confirm all default settings (just click 'ok' or 'next')
-
The build will appear in testflight in ~10 mins
-
App ID in config.xml will be changed every time before building, depending on the platform, because the bundle ID is different for ios and android. Hook is here:
hooks/before_prepare/005_switch_app_id_in_config.js
-
there are some errors in the default keyboard plugin and therefore before every build the fixed plugin will be copied from the 'ionic-plugin-keyboard-fixed' folder to directory 'plugins'. Hook is here:
hooks/after_prepare/004_copy_fixed_keyboard_plugin.js
Good tutorial https://github.com/j3k0/cordova-plugin-purchase/blob/master/doc/api.md
Tutorial: https://developers.google.com/identity/sign-in/android/start-integrating