Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade the config.xml and plugins #636

Merged
merged 6 commits into from
Apr 16, 2020

Conversation

shankari
Copy link
Contributor

  • upgrade to API 28
  • turn off google analytics
  • upgrade to the latest version of the plugins

The related manifest change was already checked in thanks to @ericafenyo
(e-mission#616)
Add android schema so that we can use `android:` tags in the xml
+ update ionic deploy to the `remove_swift_class` version
These were turned in by default when switching to Firebase
This fixes e-mission/e-mission-docs#416
which fixes all current android build issues
@shankari
Copy link
Contributor Author

At this point, the android build works

$ cordova build android
Copying locales: Languages found -> fr,it
Copying locales: I found fr, I will now copy the files.
...
BUILD SUCCESSFUL in 18s
45 actionable tasks: 43 executed, 2 up-to-date
Built the following apk(s):
	/Users/shankari/e-mission/e-mission-phone/platforms/android/build/outputs/apk/debug/android-debug.apk

@shankari
Copy link
Contributor Author

Will return to this to fix the iOS build tonight.

So they are consistent with config.xml
@shankari
Copy link
Contributor Author

shankari commented Mar 31, 2020

Apple will not accept apps using anything other than WKWebView. According to the ionic docs, this requires cordova-ios 5.1.0 or above.

Using Cordova? Update to cordova-ios 5.1.0 and above, install the WKWebView plugin, and update each Cordova plugin to the latest version.

And yes, that is in fact required
https://cordova.apache.org/announcements/2019/11/25/cordova-ios-release-5.1.0.html
includes

The ability to disable UIWebView during the compile-time.

which is needed because of
apache/cordova-ios#661

There are apparently several limitations with WKWebView.
https://cordova.apache.org/news/2018/08/01/future-cordova-ios-webview.html

Of the limitations they highlight,

Cookies don't persist. This is a WebKit bug, but someone has created a plugin for a workaround. See CB-12074

We don't use cookies

Can't delete cookies. This is/was a WebKit bug (2015), we need to test for the iOS 11/12. See CB-11297

We don't use cookies

Can't execute JavaScript code in the background. There are several issues related to this. See CB-12815

Most of our functionality is already native code. But we do

XmlHttpRequests don't work, because of Cross-Origin Resource Sharing issue (CORS). There is a workaround plugin created by Oracle (UPL licensed, which is Apache-2.0 compatible). See CB-10143

We use XHR for the aggregate calls, need to fix them.

Migration of localStorage from UIWebView. There is a migration plugin available. See CB-11974

Fortunately, we moved away from local storage to the database a long time ago. Should probably remove alert about data missing from local storage.

iframes will not be supported any longer (they are now CORS restricted in WKWebView), and may be partially or completely broken. This may lead to incompatibilities with the same code in other Cordova platforms.

No iframes

Known issues with WKWebView on iOS pre-11 which will be deprecated and dropped in a future Cordova release

???

@shankari
Copy link
Contributor Author

Given all the stuff that broke when we last tried to upgrade to cordova-ios@5, and the newer things that will break, I will migrate to the new system in the new app (https://github.com/covid19database/phone-app), which has fewer dependencies.

Then, I can migrate the changes back here.

To use the correct config file.
This fixes e-mission/e-mission-docs#518
@shankari
Copy link
Contributor Author

It turns out that I needed to upgrade not just the iOS version but also the android version in order to support kotlin. I will migrate all the changes over, but for now, I will merge these changes.

@shankari shankari merged commit de7f58e into e-mission:master Apr 16, 2020
@shankari shankari deleted the apply_plugin_updates branch April 20, 2020 04:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant