Why Apple doesn't like PWAs (Progressive Web Apps)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
since around 2017 mobile devices are the primary way people access the internet internet connected apps mostly come in two forms on mobile devices native apps which are installed to the device and web apps which are streamed through a web browser native mobile apps are very convenient to find and install on your home screen and make great use of the device's hardware so why do we even need web apps have you ever been to a cafe who insists you spend five minutes finding and installing their app just so you can look at the menu this app will probably just take up space on your home screen until you finally have to delete it when your phone gets too full this app probably would serve users much better if it were simply a web app some of the advantages of web apps is that they don't require a large installation they can easily link to other sites and they're free from the requirements of app stores however many companies find web apps unsatisfactory because they often don't have the capabilities that native apps do this is slowly starting to change thanks to progressive web apps google introduced the term progressive web app in 2015 to describe a web app that uses new web features to create a native app-like experience the majority of these features are available through new web apis like the push api for push notifications the bluetooth api the geo location api and many more one of the most important features of pwas that distinguishes them from regular web apps is that they can easily be installed on the user's device and accessed through a home screen icon just like a native app one of the major challenges of pwa development however is that not all devices can support the same features obviously newer phones and tablets will have features that older ones don't an even bigger challenge is inconsistent supportive features across different operating systems and browsers for example you may want to support bluetooth devices in your app this will work fine for chrome on android but safari on ios does not support the bluetooth api sadly a certain amount of this inconsistency is not technical in feasibility but rather the priorities and politics of big tech on one side you have google and microsoft while these companies are normally rivals they're united in their fear of apple's app store for this reason these companies are eager to support more web apis as it's in their interest that people access the internet outside the walled garden of the app store they've even gone as far as to share the same browser code base chrome and microsoft edge are both built upon google's chromium engine which results in less friction for new feature support on the other side you have apple who've been slow to adopt many pwa features they've even gone as far as to refuse to support some new apis entirely like web bluetooth web usb and the battery status api their official line is that these apis allow advertisers to fingerprint users and therefore pose a threat to privacy but some commentators believe this is nothing more than a cynical front for their campaign to make web browsers a second class experience why would apple want you to use the web instead of their app store where they take a 30 cut on all transactions and keep you locked into their hardware regardless of the reasons behind it these inconsistencies must be dealt with by developers when implementing progressive web apps indeed the word progressive refers to the concept of progressive enhancement what this means is that some of the cutting edge features of your app may only be available to users whose software and hardware provides compatibility as such when you code a progressive web app you'll need to check if a feature is available before you use it but the real challenge of pwa development is ensuring the user experience is still good no matter what device the user is on if you're enjoying this video so far then you want to check out debt trends pro here you'll find even more videos on the most important topics of development that you won't find on this youtube channel plus pro members get all our videos at least a month earlier to begin a free trial head over to dev trends dot io pro any web app can utilize new web apis to get access to native features but to call an app a progressive web app there's a base line of features that it should include primarily it should have a web app manifest and a service worker these features will allow your web app to be installable and usable offline let's start with the web app manifest which lists information about your progressive web app that is required for installation the manifest is in json format and defines the app's name path to different size icons that can be used on the home screen colors that can be used for loading and splash screens and so on once you've defined your manifest you can load it in your index.html file where it'll be discovered by the browser when a user visits your site when a web manifest is present the user may be presented with a notification to install your app on their device assuming that they are using a browser that supports this if user decides to install your pwa an icon will be added to their home screen now they can launch and use your pwa just like any native apps installed on their device another benefit of having a valid manifest is that it will also allow your pwa to be available for distribution in the google play store as well as the samsung galaxy store and microsoft store the second baseline feature for pwas we mentioned is the service worker this allows your app to load and provide minimal functionality even when the user is offline service worker is an isolated javascript scope that functions as a proxy for network requests coming from your app since a service worker can intercept requests and responses it can build a cache version of your site while your user is online then once your user is offline they can continue to use your app as a service worker can generate responses by drawing from the cache to use a service worker you first need to register in your app remember progressive enhancement here you should first check if the api is supported fortunately it will be in most modern browsers a service worker script will typically begin with an event listener on the fetch event this will allow your service worker to intercept any network requests originating from your app in the event handler we can check any request to see if it's already been cached and return that even if your app isn't offline this is useful because it's faster and more efficient to use cache rather than fetching from a remote server if a resource is not cached we can let the request proceed as normal and cache the response before returning it in addition to the web app manifest and service workers there are many other web apis that can be used in a pwa to provide native features one example is the push api which allows your web app to receive push notifications push notifications are a native-like feature that can prompt a user to re-engage with your app even when they're not currently using it the push api actually runs on top of the service worker api as service worker scripts can be activated even when the associated page is not active when progressive web apps were announced by google back in 2015 many people predicted they would take over as the dominant app architecture of mobile devices this has not been the case with pwas still only accounting for around two percent of app downloads on google play in 2020 that said the popularity of pwas is still growing albeit at a much slower rate than expected but there is reasons to be hopeful for more growth in the future thanks to recent antitrust cases apple's app store monopoly is now under scrutiny from regulators apple may have no choice but to encourage pwa adoption to prove to regulators that the app store isn't anticompetitive then there's project fugu this group has been formed by google microsoft and intel and continues to develop web apis for the multitude of native device features still not supported by the web there are a ton of interesting ones at various stages of development you can see a list on the fugu tracker site thanks for watching this video if you want to keep up with the latest developer tools and trends be sure to check out our membership site dev trends pro here you'll find exclusive videos that we don't release on youtube plus you'll be able to access our content a month or so earlier you can start a free trial by heading over to dev trends dot io pro
Info
Channel: DevTrends
Views: 2,267
Rating: undefined out of 5
Keywords:
Id: eoUvIm8Pl6I
Channel Id: undefined
Length: 9min 50sec (590 seconds)
Published: Thu Aug 26 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.