DEV Community

Cover image for Most frequently asked questions in PWA
Nishant Contractor
Nishant Contractor

Posted on

Most frequently asked questions in PWA

I am writing this blog to share my findings on a question that I had during the developments of PWA. I went through many blogs and tutorials for this and I found few things are not working with IOS while Android has good support for PWA.

Let's see them one by one.

Can PWA access camera?

Yes, both the OS gives access to the camera, which allows image and video capturing in PWA.
Android: YES
IOS: YES

Can PWA work offline?

PWA leverages data caching during your last interactions with the app, and by doing that it works offline while there is no internet connection.
Android: YES
IOS: YES

Can PWA access the file system?

is the only way you can access a regular storage file system, which will not have any event listener. PWA can't listen to regular file system changes except for the files of APP.

Can PWA access the Bluetooth?

The web Bluetooth API is a low-level API allowing web applications to pair with the nearby Bluetooth Low Energy-enabled peripheral devices and access their services exposed. But it's not supported on all platforms.
Android: YES
IOS: NO

Can PWA access the phone’s GPS?

A lot of browsers support this recent feature and these include Chrome, Edge, Firefox, Safari, and Opera. In IE, you’ll have to battle a few configurations to make it work
Android: YES
IOS: YES

Can PWA use advanced camera functionality?

Advanced camera functionality is not available on all platforms. For example QR CODE scanning.

Android: YES
IOS: NO

Can PWA access contacts?

No there is no way to access contacts in PWA, it is mainly restricted for security purposes.
Android: NO
IOS: NO

Can PWA check for new updates?

Yes, in order to achieve this you have to check your cached files are changed or not. We can implement this by writing a hook in onupdatefound function on the registered Service Worker.

Here I found a detailed blog for this that explained each step in detail.
https://medium.com/progressive-web-apps/pwa-create-a-new-update-available-notification-using-service-workers-18be9168d717

Can PWA have Push Notifications?

This is the most crucial part of any applications and many product owners avoid PWA just because of these limitations. Android support push notifications but IOS does not support. Maybe Apple can update in the next version 14. But we have to wait till that.
Android: YES
IOS: NO

Top comments (9)

Collapse
 
victorioberra profile image
Victorio Berra

Notifications are the biggest gripe right now. I wish LocalNotifications API just worked out of the box without any need for complicated Google services. they don't even seem to work on non-pwas on mobile.

Collapse
 
anwar_nairi profile image
Anwar • Edited

Chrome 80+ support the Contact Picker API which can help you access the contact list of a smartphone 😉

web.dev/contact-picker/

Collapse
 
niscontractor profile image
Nishant Contractor

Thanks for share, it will be very helpful to us.

Collapse
 
mlkrsrc profile image
Mustafa ilker Sarac • Edited

Great article, it served well for almost 4 years but it might need an update though. Starting with push notifications, ios is claimed to be supporting web-push now.
developer.apple.com/documentation/...
qvik.com/news/web-push-notificatio...

This is a great site for demoing some of the PWA features.
whatpwacando.today/

Collapse
 
pandazaur profile image
Alexandre Borel

Nice post !

Why not talking about the App Store support ? You can now publish PWA on Play Store (idk about Apple Store)

Collapse
 
niscontractor profile image
Nishant Contractor

Thanks for read.
Will try to cover this topic in our future blogs.

Collapse
 
monfernape profile image
Usman Khalil

Wow, great checklist.

Collapse
 
niscontractor profile image
Nishant Contractor

Your words motivates us.
Thanks..

Collapse
 
umy22 profile image
Umang

How Can PWA access the phone’s GPS? Please share any API or reference link for accessing GPS location via offline using PWA