Monday, May 7, 2018

ionic framework tutorial

1)  npm install -g ionic cordova (-g is means global install)
2) cd to the folder u wan to create the app
3) ionic start helloworld blank (it will generate a folder and files at the path u cd)
  • template : blank, tutorial
4) cd to helloworld (IonicProject)
5) ionic serve (run your app)

Publish to Android

1) ionic cordova run android --prod --release (cd to IonicProject)
1.1) The file location will at "platforms/andriod/build/output/apk"

*if no work install JAVA 1.8jdk-8u172-windows-x64.exe
at Environment Variable set JAVA_Home to C:\Program Files\Java\jdk1.8.0_172

2) Create Key store
2.1) cd to c:\Program Files\Java\jdk1.8_0172\bin2.2) keytool -genkey -v -keystore C:\KeyStore/appkey.keystore -alias MyKey -keyalg RSA -keysize 2048 -validity 10000
2.3) Ask password and questions

3) Sign the unasigned APK
3.1) cd to c:\Program Files\Java\jdk1.8_0172\bin
3.2) jarsigner -verbose -keystore c:/keystore/appkey.keystore -storepass [keystorepassword] -keypass [keystorepassword] c:/keystore/app-release-unasigned.apk Mykey

4)Zip Align
4.1) cd to c:\users\[user]\appdata\local\andriod\sdk\build-tools\27.03
4.2) zipalign -v 4 c:/KeyStore/app-release-unsigned.apk c:/KeyStore/MyIonic.apk

No comments:

Post a Comment