简体   繁体   中英

Add WebView to Progressive Web App (PWA)?

I have been creating Progressive Web App (PWA) using Angular 6.

Tt's possible to add WebView to my application?

How I can do to achieve this?

Thanks.

If you wanted to do the other way around, load your PWA inside a WebView, that would be possible.

To do it all yourself, there are tutorials you can follow:

But it may be easier to use a wrapper, to set up a suitable environment for the PWA:


You can also get some good tips from this question .

Amongst other things, it suggests using PWA Builder , which does look quite nice. From the site:

PWA Builder was founded by Microsoft as a community guided, open source project to help move PWA adoption forward.

I think it will create your Android and iOS builds all in one go.


This paper discusses the current state of play (2018) and also has some example code for checking which PWA features are available in the WebView you are using.

Progressive web app itself is a web app and so you can't add webview to it, which is only applicable when you are having a native app and want to show some web content.

Why would you want to have a webview in a webapp (PWA is also a web app, its just that it can be installed to home screen).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM