republik / app

The app: a thin wrapper for persistent auth, app store presence, notification, background audio and convenience.
https://www.republik.ch/app
Other
11 stars 2 forks source link

RFP: V2 with Offline Capabilities #204

Closed tpreusse closed 3 years ago

tpreusse commented 4 years ago

We'd like to reboot our app effort.

Current pain points

Constrains

Approaches we've thought about but not fully explored

Budget Currently CHF 10k-30k feels right. The more solid the solution is the more we're willing to pay. Ideally it would become a well documented open source approach to wrap Next.js frontends in apps.

Research Notes

tpreusse commented 4 years ago

A few preliminary conclusions from @patte research:

In my mind a next-cordova plugin would still be the nicest approach. Features:

tpreusse commented 4 years ago

Interesting WKWebView Limitations List from «Breaking changes coming to the iOS WebView in Apache Cordova»:

  1. Cookies don't persist. This is a WebKit bug, but someone has created a plugin for a workaround. See CB-12074
  2. Can't delete cookies. This is/was a WebKit bug (2015), we need to test for the iOS 11/12. See CB-11297
  3. Can't execute JavaScript code in the background. There are several issues related to this. See CB-12815
  4. 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
  5. Migration of localStorage from UIWebView. There is a migration plugin available. See CB-11974
  6. 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.
  7. Known issues with WKWebView on iOS pre-11 which will be deprecated and dropped in a future Cordova release

Regarding cookies: most likely we've already sufficiently worked around those issue with additional cookie forwarding and reloads during sign in in the web frontend. As we're already using WKWebView in React Native. But we do also have this custom fix on our native web view wrapper code but as far as I remember it is no longer strictly necessary.

tpreusse commented 4 years ago

There is a Cordova plugin to support SW with UIWebView. But does not work with WKWebView.

Apparently SW do not work on Android with Cordova because Cordova Apps aren't served over https.

But also some good news: Cordova iOS 6.0.0 Released! This seems to solved all the CORS issues. But also requires iOS 11.