Skip to content
This repository was archived by the owner on Nov 4, 2021. It is now read-only.
This repository was archived by the owner on Nov 4, 2021. It is now read-only.

Add example for a PWA and Mobile application #9

@dugwood

Description

@dugwood

I've searched a lot about PWA (including all your announcements on your blog), but I can't find out what's the way to go if you want to create both iOS/Android application and a PWA «fallback»:

  • do I need to include cordova.js (generated by ionic build browser)?
  • for plugins such as Google Maps, can I use the Cordova plugin (cordova-plugin-googlemaps) for desktop browsers (including IE) or should I use both the Cordova plugin and the Google Maps Javascript API (pure Javascript)?

Until now, I was only creating a PWA (for a demo) that I will convert to Hybrid app in the long run. I've pointed my web-server to myApp/www/, with a fake cordova.js that will load Google Maps Javascript API and set a flag isBrowser (should be isPWA!) that I use here and there to handle whether I'll use Cordova or not (geolocation & maps for instance).

Am I doing things the right way? Or should I load the whole PWA from plaforms/browser/www/?

I think a post or a documentation on this would be great. In your demos, I can see that anonchat or soundel are using cordova.js, but maybe it doesn't do anything if it's not a Cordova-based browser (ie Chrome/Android or Safari/iOS => Edge doesn't understand those commands).

Also I get browser's approval warning for storage (@ionic/storage) with cordova-based PWA, and not with the non-Cordova version. For now that's a good reason to me to continue with non-Cordova version.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions