What PWA Can Do Today
whatpwacando.today, by Dutch developer Danny Moerkerke, is a comprehensive showcase of the capabilities of ‘Progressive Web Apps’ (PWAs). PWAs are websites which you can add to your home screen and which have some of the functionality of native apps. iOS doesn’t support all of the APIs by any stretch, but implements enough of them to make for a decent-enough end product, depending on your app’s use case. (For a detailed list of what is supported and what isn’t, see Maximiliano Firtman’s iOS PWA Compatibility page.)
Features that work on both iOS and Android, and which you can use in your PWA, include push notifications, offline support via Service Workers, biometric authentication (which allows for login with Face ID and Touch ID), web share (where you can use the OS’s native share mechanism), audio recording and geolocation. The Payment Request API allows you to offer payment with Apple Pay or Google Pay. Most of these features can also be employed in websites running within a normal browser session. (An exception is push notifications on iOS, which only work if your website is installed on the home screen.)
Most of my websites function as PWAs, with the exception of working offline, which in past attempts I’ve never got to work well enough. (I could never make fetching updated assets reliable, and didn’t want users to get stuck on an old cached version of the site.) Maybe I’ll give Danny’s Basic Service Worker a shot to try and solve this problem.
(h/t JavaScript Jabber.)