GeoHealth / HAppi_mobile

Apache License 2.0
1 stars 0 forks source link

Déployer l'app sur le Play store #136

Closed seza443 closed 7 years ago

seza443 commented 7 years ago

Small guide: http://ionicframework.com/docs/v1/guide/publishing.html

https://cordova.apache.org/docs/en/latest/guide/platforms/android/index.html#signing-an-app

seza443 commented 7 years ago

How to have a self-signed certificate and use it to sign an app: http://www.androiddevelopment.org/tag/apk/

seza443 commented 7 years ago

Now with my self-signed certificate, I can build a signed apk using:

ionic run android --prod --release -- --keystore=../path-to-keystore.keystore --alias=alias
seza443 commented 7 years ago

Next error I encountered is related to Fabric:

 This app relies on Crashlytics. Please sign up for access at https://fabric.io/sign_up,

I resolved it by removing than re-adding the plugin Also, I resolved it by removing my app from Fabrix dashboard

seza443 commented 7 years ago

Next error I encountered is:

Failed to validate the certificate chain, error: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.

So either we add our self-signed flynn certificate to the app #134 Or we generate a real, trusted certificate using Let's encrypt -> expires every 90 days

seza443 commented 7 years ago

ref #134 <-- once this is done, the app, built in release mode, will be able to communicate with the backend <-- we will be able to deploy it on the Play Store 😉

⚠️ For delete http call, we still use Angular/Http since Ionic/HTTP does not support it yet ( https://github.com/wymsee/cordova-HTTP/issues/111 and the pull request is https://github.com/wymsee/cordova-HTTP/pull/105/files?diff=split&short_path=04c6e90 )

seza443 commented 7 years ago

First, let's add a certificate to Flynn: https://blog.ryl.io/post/letsencrypt-with-flynn/

seza443 commented 7 years ago

certbot certonly --manual --preferred-challenges dns

Certificate expires 18-08-2017

Stored in : /etc/letsencrypt/live/doctors.happi-doctor.be/fullchain.pem

seza443 commented 7 years ago

Let's update the routes

First show the routes ID with flynn -a geohealth-happifrontend-master route Then update the route to use the certificate:

seza443 commented 7 years ago

Okay l'app fonctionne avec le certificat.

seza443 commented 7 years ago

https://play.google.com/store/apps/details?id=com.geohealth.happi