e-mission/e-mission-docs

⬆️ Track upgrade to cordova android@8.1.0 and ios@5.1.1

shankari opened this issue · 7 comments

We have been working on a covid-19 tracking reference app in the
https://github.com/covid19database/phone-app fork.

There, we upgraded to the latest version of both cordova-android and cordova-ios modules, and to the latest versions of the plugins.
The https://github.com/e-mission/e-mission-phone/tree/upgrade_to_latest_cordova branch is tracking the changes required.

This is tracking the effort to port the changes back.

✨ Improvements ❇️

  • latest cordova versions on both android and iOS
  • latest versions of most other plugins
  • supports kotlin on android and swift on iOS
  • enables CI so we know whether the build is broken (e-mission/e-mission-phone#639)
  • WKWebView on iOS, all references to UIWebView have been removed

Current status:

  • basic functionality works
  • parts which need to be ported/tested over the coming weeks, in order of priority.
    • devapp
    • test push notifications
    • port deploy code
    • test openid auth
    • debug and fix trip end notifications

If you would like to contribute testing results, you can do so here. Hopefully we will have a reasonable amount of coverage before we promote this to master.

port deploy code

Tackling this first so that we can finish the javascript changes before upgrading the devapp.
The new deploy interface is:
https://github.com/ionic-team/cordova-plugin-ionic/blob/master/docs/interfaces/ideploypluginapi.md

Without the port, we get the error:

[Error] Unhandled Promise Rejection: TypeError: deploy.check is not a function. (In 'deploy.check(resolve, reject)', 'deploy.check' is undefined)
	(anonymous function) (updatecheck.js:52)
	promiseReactionJob

Deploy port done (e-mission/e-mission-phone@78503b9).
Next step: check that the push notifications work.

After that, I plan to work on the devapp and upgrade to the even more recent version of e-mission before fixing the trip end notification code since there may be additional changes required.

Push notifications work on both android and iOS.
On iOS, you need the hack to use APNS tokens.
#437 (comment)
until we change the server code as well

Given the extra configuration, it might be easier to just use the FCM token throughout and remove the mapping code from the server. But I am a bit leery about FCM lock-in, and being unable to switch to other providers in the future.

Ok, so I'm going to merge this, and then make the same changes to the devapp and the emTripLog app.
Open issues:

  • trip end notifications: which I will address after I upgrade to cordova 9
  • no testing of OpenIdAuth code: hopefully the FabMob team will do this and report

I'm going to declare this done right now, since I already closed #554