
Progressive web apps are coming to iOS 11.3: Cupertino, we have a problem - adrian_mrd
https://medium.com/@firt/pwas-are-coming-to-ios-11-3-cupertino-we-have-a-problem-2ff49fd7d6ea
======
Klathmon
This article doesn't mention what is in my opinion the worst part of iOS PWAs
(or web development in general).

The engine that runs a PWA (or web-view, or app added to the home screen) is
completely different than the one in safari.

The "WebView" engine, (specifically a UIWebView, WKWebView, or
SFSafariViewController) don't have some features turned on, like WebRTC. And
there are rendering differences between the 2 engines.

I was really screwed by this recently. I saw iOS 11 was to get WebRTC and
getUserMedia support, so I tested out a POC and found it worked in safari. So
I started building it out in safari, mostly just turning on the feature if it
was supported in safari, and when I went to go test a production version of
the app added to the homescreen, it was failing.

Turns out It's not only not supported on the WebView, but it still advertises
that it's supported, and you just need to catch the failure when you go to use
it to know that it's not supported...

Now I either had to tell my users to REMOVE the bookmark on the homescreen if
they were to use this new feature, and warn people to NEVER add the app to the
homescreen as it would break the feature, or just forgo the feature entirely,
which is what I ended up doing.

~~~
osrec
This makes my blood boil. Safari is literally the IE of mobile. I don't get
why Apple is making it so hard to deliver PWAs nicely?! I mean, they can fight
it, but they'll at best delay the inevitable... Perhaps that's their game:
delay until they have in place a system as lucrative as the app store but for
PWAs.

~~~
Klathmon
Trust me, It made my blood boil too. I unfortunately let my anger get the best
of me and ended up getting in an argument with an Apple engineer online where
I said some things that I really regret.

But it did almost really fuck up my job, because we had promised a client that
functionality, and like 2 weeks away from delivering had to back out and go
with a fallback plan of staying up all night for many nights those 2 weeks
coding something in cordova that would give me similar results.

It ultimately was my fault for not testing the feature in the correct way
before committing to it, and it did turn out good for me (although it's far
from ideal, having getUserMedia in WebViews is ideal, and I will be switching
to it the second it's available and stable), but it was not a good time...

~~~
sova
Funny how sometimes with software and the way it is distributed, we can either
have a handful of engineers figure it out the first time and distribute it
correctly, or let the rest of the world of engineers reinvent the tandem
bicycle for the k+nth time. I'm glad they are working on it, sorry you had to
go through that. Sounds like you are a super ninja though and did not mind the
extra grapple. You know, I often send in feature requests and application
feedback. Probably once a month to Apple, or a website, or some service,
because that's how they get better. In the end, we are all somehow serving one
another (it's not just clients and customers and experts) and I think that
it's important to appreciate how we got here - meaningful conversation and
discourse.

------
kitsunesoba
So unless I’m mistaken, PWAs in their most “ideal” form (vs how Apple has
implemented them) kinda hang around after I’ve visited them, can use some
arbitrary amount of disk space, leave background processes running, and can
send push notifications even after I’ve navigated elsewhere. It sounds like to
some extent they effectively get to install themselves on my device without my
permission, with visiting the site in question acting as consent. Am I
incorrect?

If all the above is true, I can’t say I’m too happy with the feature as a user
and hope there’s a universal off switch buried in settings somewhere. If I
choose to use a website over a native app it’s due to its ephemerality, so I
have no interest in web apps that stay past their welcome.

If on the other hand the behavior is 100% opt in, that’s fine as long as I’m
not shown banners trying to sell me on the PWA all the time.

~~~
aeharding
Just like a native app, the process requires user approval ("add to
homescreen" vs "install"). A large difference, however, is that native apps go
through Apple's approval process.

~~~
madeofpalk
Does the Service Worker caching ability require approval?

~~~
anderber
I don't think so, just SSL is needed.

------
kaycebasques
If you’re wondering what exactly makes something a PWA, check out the
Progressive Web App Checklist for the canonical definition.

[https://developers.google.com/web/progressive-web-
apps/check...](https://developers.google.com/web/progressive-web-
apps/checklist)

Check out the case studies for why businesses are (rightfully, IMO) interested
in PWAs.

[https://developers.google.com/web/showcase/2017/](https://developers.google.com/web/showcase/2017/)

Disclosure: I work on Google Web DevRel team

------
TheAceOfHearts
I don't understand why people make so much noise about PWAs. Am I the only one
that doesn't mind opening his browser and then clicking on a bookmark?

~~~
kaycebasques
There's a lot of case studies on PWAs driving significant increases in
conversion rates and engagement.

[https://developers.google.com/web/showcase/2017/](https://developers.google.com/web/showcase/2017/)

Disclaimer: I work on Google Web DevRel, which owns developers.google.com/web

~~~
nailer
Is there a single platform where I can add a web app to the taskbar, dock or
home screen and start in as a regular app?

I don't use Android, but I've never seen this work using any browser on MacOS,
Windows or iOS.

~~~
Someone
On both Android and iOS, you can add any url to your home screen
([https://www.howtogeek.com/196087/how-to-add-websites-to-
the-...](https://www.howtogeek.com/196087/how-to-add-websites-to-the-home-
screen-on-any-smartphone-or-tablet/))

~~~
nailer
I know, it just opens in a browser, not like a real app.

------
Naomarik
The worst thing about trying to make something work in the browser for mobile
is getting the UI to utilize the full height. This is common when the UI needs
to have both something stickied on the top and bottom of the page. Both Chrome
Android and Safari will cut off content if that content is 100vh with their
URL bar that comes and goes as you scroll. Then you have full screen mode
which iOS does not support but Chrome does, except that on Chrome invoking the
keyboard does not tell the page anything about the height that it's taking up.

The only browser that gets everything correct is Samsung's default browser.
This is pretty ridiculous and the hacks available with current APIs aren't
very good compared to if these browsers worked properly with 100vh.

------
st3fan
Just a reminder that if you want the WebKit team to be aware of bugs or things
that do not properly work or features/standards that need to be better
supported, file bugs at [https://bugs.webkit.org](https://bugs.webkit.org)

They also have a mailing list, and one of the things they asked before this SW
work started was 'let us know how important this is to you and what your use
cases are'. I bet they are still listening and that they would love feedback.

------
fictionfuture
PWAs on iOS mean a huge shift in strategy for startups.

In many cases(including mine) it now makes more sense to go PWA first instead
of native.

~~~
walterbell
In which cases are native still better than PWA?

~~~
matthewmacleod
All of them, in my opinion.

I have not encountered a single case where a web app offered a better
experience than a native app.

There is a reasonable argument that it's cheaper to develop, allowing support
for more platforms to be rolled out with less development time. That's the
single reason that might be valid.

~~~
lern_too_spel
I strongly prefer the Twitter PWA to the Twitter app. It uses only 279 KB
storage on my phone. When Firefox 58 finishes rolling out, I'll play around
with using web extensions to customize the app, which is something that will
likely never be possible with a native app.

------
Asmod4n
Its a good thing the Safari App and Apps from facebook et all don't share the
same Cache etc. I don't want facebook to be able to know which sites i have
visited before from other Apps or Safari.

~~~
fabrice_d
Service Workers Caches are not shared across origins, and they are completely
isolated from the browser’s HTTP cache [0].

[0] [https://w3c.github.io/ServiceWorker/#cache-
objects](https://w3c.github.io/ServiceWorker/#cache-objects)

------
ninkendo
So this means the experience of extracting any useful information from any
website I click on from a google results page is going to keep getting worse.

We already have popups to log in, popups to sign up for newsletters, popups to
take surveys, popups to install the app instead of _viewing_ the website,
full-screen ads, popups to enable notifications, popups for a site to access
my location, popups about enabling cookies, and popups telling me to stop
blocking popups. Every site now thinks just because I'm clicking on it from a
search result page means I want to engage in some semipermanent _relationship_
with them, before I even get a chance to view the site. Now we just add one
more thing to the pile of things every website under the sun will try to get
me to do just because I clicked one link.

Remember when web pages were just documents you could view?

Honestly? Fuck the web.

------
LeanderK
What about macOS? Are PWAs limited to mobile?

~~~
madeofpalk
"PWA" isn't actually a _real_ thing.

This article focuses on Web App Manifest, and Service Workers (Caching).
Safari on macOS definitely has Service Workers, but I'm not sure Web App
Manifest support on desktop (nor am I clear on how that would make sense)

~~~
LeanderK
I was speaking about the concept. So essentially using ServiceWorkers, Web App
Manifest etc. to produce something that resembles native apps.

Why would it not make sense? I was just thinking about giving macOS the same
functionality as iOS (so "installing" web-pages), having them in the dock and
giving them a different UI. I have some electron apps installed on my mac that
don't need much more functionality and could just be converted to a PWA if
supported on macOS.

------
LeanderK
Are there some quick, easy and usable UI-frameworks for buttons etc. and other
common UI-Elements? I am a bit out of the loop in the web-ecosystem, but the
PWA look very interesting.

~~~
WA
Ionic. I found it to have the most polished components. Better than
Framework7. Also, you get a PWA with zero additional config when developing
your SPA with Ionic. I’m happy with it.

------
scottlu2
I’m curious how Apple will balance PWA support with the business case for the
App Store.

------
kyriakos
Push notifications?

~~~
kaycebasques
I'm wondering about this myself. Service worker support definitely paves the
way for PNs (because the service worker handles receiving messages via the
`push` event listener), but I haven't seen explicit mention of them in this
announcement.

[https://developer.mozilla.org/en-
US/docs/Web/API/PushEvent](https://developer.mozilla.org/en-
US/docs/Web/API/PushEvent)

------
colinbartlett
PWA = Progressive Web Apps for anyone else confused.

~~~
kaycebasques
Check out the Progressive Web App Checklist for the canonical definition.

[https://developers.google.com/web/progressive-web-
apps/check...](https://developers.google.com/web/progressive-web-
apps/checklist)

Disclosure: I work on Google Web DevRel, the team that owns that site

------
karmajunkie
TL;DR—Don't get too excited, Safari is still the new IE.

~~~
akmittal
Lots of people believe chrome is new IE

~~~
karmajunkie
Indeed, they may all be correct!

