
iOS 12.2 Beta: Progressive Web App Capabilities - tosh
https://twitter.com/mhartington/status/1089292031548145666
======
IvanK_net
I developed a web-app photo editor
[https://www.Photopea.com](https://www.Photopea.com), that is used on 100 000
iOS devices at least once a month.

I am very happy, that I never had to go through the pain of submitting my
"app" to Apple store or paying any fee. I never even owned any iOS device.

~~~
kop316
That is a really cool app! I bookmarked and I will definitely check it out
later.

------
reichardt
Without fanboying to much, I want to add how important PWAs are to breaking
the walled gardens of the App Store and Play Store. Apple and Google can and
will stop your app from distributing via their stores if they see fit, but
they can't stop users from adding a PWA to their home screen.

This is great for user rights and moves the needle more towards a
decentralized and open ecosystem, while maintaining strong security guarantees
to the end-user.

~~~
coldtea
It bothers me that PWAs are a thing too. If we have a perfectly capable
computer in our smartphones, just let a native app (whether it uses a higher
level language or not) handle it.

Better performance, better battery use, better integration, more platform
features available, better look and feel, and so on...

~~~
IvanK_net
\- "better performance, better battery use" \- this is not true at all. What
makes you think so?

\- "better integration, better look and feel" \- it depends a lot on available
web standards, which are constantly improving.

You forgot about disadvantages: Developers need to develop several versions of
their app (they could spend that time on improving one version). They need
several devices for testing (luckily, there are Unity and Xamarin). Authors
have to pay fees for having their product in various "stores". Big
corporations (such as Google, Apple, Microsoft, Steam) can throw you away
anytime for any reason, accuse you of various violations. But noone can
prevent you from going to a website.

~~~
coldtea
> _- "better performance, better battery use" \- this is not true at all. What
> makes you think so?_

How is that even remotely controversial? With native you run direct native
code, in C/C++/Obj-C/Swift/etc and optimized native UI libraries. With a PWA
you run a browser engine, a DOM rendering pipeline, and on top of it you run
Javascript, and on top you run one today's frameworks. Guess what uses less
battery? Ever did a comparison of native vs Electron apps on the desktop,
where it's easy to compare?

(To preempt a facile counter-argument: yes, a native app can be coded very
silly, do busy wait or whatever, and eat all the cpu/battery/memory. We're
interested about baselines and what happens "everything else being equal").

> _- "better integration, better look and feel" \- it depends a lot on
> available web standards, which are constantly improving._

Doesn't matter how much they improve, they will always not be 1:1 with the
access to the smartphone OS's SDK libs a native app has.

Nor would be the exact same look/feel as the platform (which native gives
you), ever compare to someone's ad-hoc UI or re-implementation of the native
L&F.

> _You forgot about disadvantages: Developers need to develop several versions
> of their app_

That's a disadvantage of the developer, not the user. Why would I as a user
care? So that I can get more worse apps more easily?

Besides, WPA still need testing -- especially if they use the "available web
standards, which are constantly improving".

> _Authors have to pay fees for having their product in various "stores"_

Still good in my book. Puts a somewhat higher barrier for crap.

~~~
pjmlp
As answered on another thread, PWAs are native apps on some OSes, like
ChromeOS and Windows.

~~~
coldtea
The OS, like ChromeOS, having "first class support" for web technologies
doesn't make those apps native.

ChromeOS still runs a Linux underneath, and could run apps without a web
layer, DOM, etc, if allowed.

When most of us call for "native apps" we don't mean "first class OS support"
we mean "as little BS layered crap as possible on top of the CPU" \-- so AOT
or even a low level VM fits that, a web rendering engine, the DOM, and JS,
does not.

~~~
pjmlp
ChromeOS native apps are web apps, like it or not,that is what we get, even
Android and the alternative Linux environment run inside VMs.

As for the second part, that is exactly what Chakra within UWP does on
Windows.

~~~
coldtea
> _ChromeOS native apps are web apps, like it or not,that is what we get_

Again, I explained what I mean by native apps (which is what everybody means).
What "we get" and whether we "like it or not" has no bearing as to whether
they're native.

When iOS at first had no public Obj-C SDK and only allowed web apps, those web
apps weren't magically "native" just because that was what Apple
encouraged/allowed.

"The only type of apps that are encouraged/supported by the vendor" is not the
same as them being native apps.

~~~
pjmlp
So Chackra isn't a "even a low level VM"?

At which point do you draw the line between bitcode on watchOS, ART on
Android, and Chackra on UWP?

------
neya
Buried in that thread are some key details:

    
    
        Apps may not use their own mechanisms to unlock content or functionality, such as license keys, augmented reality markers, QR codes, etc.
    

Basically, forcing native apps to use their in-app purchases. Won't this
trigger anti-trust laws?

~~~
delinka
They've always forced native apps to use IAP (or no purchase on the device at
all; go buy an eBook on Amazon's web site, and you can read it fine in Kindle
on iOS) for digital goods.

Forcing web app IAP? I don't see them pulling that off successfully.

------
ksec
I _guess_ Services Worker is fine on iOS and iPhone. Because you rarely have
Safari opening all the time. On macOS it is god damn awful. [1]

I am also a little uneasy with PWA, on quality, safety and without some sort
of App Store firewall guarding it. But then I also don't see the point of KFC,
McDonald, or every restaurant / services sector require an App for their
business. When it could be on the Web or as Web App.

[1]
[https://twitter.com/gruber/status/1083810719009787904](https://twitter.com/gruber/status/1083810719009787904)

~~~
reichardt
Yeah, agreed. User permissions need to become more granular. A web app should
not be able to use all CPU power for prolonged amounts of time. Instead the
browser should drastically limit computing usage of a web app, till the user
gives the explicit permission for more. That way web apps can gain more
capabilities but only with the users permission.

On your second point I wholy agree that not every fast food chain or coffee
shop needs a native app on their customers phone. Starbucks PWA shows the way.

------
miki123211
nice. Still no push notifications which is a huge no for me when it comes to
PWAs at this stage. I know there's pushover but their licensing sucks, not
every user can and wants to buy it.

~~~
arjunbajaj
I agree. If Apple would support push notifications for PWAs, it would almost
level the playground for most kinds of apps.

~~~
kyriakos
That is precisely the reason they are not going to be supported.

~~~
untog
I'm not so sure. The Push API and Notification API are two separate things on
the web, and one and the same on iOS. It wouldn't be immediately
straightforward to wake up a service worker in response to a push event on
iOS, so I can believe they are trying to find the optimal way of doing it.

(I also believe it's not a huge priority)

~~~
kyriakos
I understand that push notifications are being abused by many sites who just
try to spam users but a good number of potential PWA's will become possible of
push notifications become available. On the other hand I see Apple being
worries about losing control over their walled garden if they give too much
freedom to the browser.

~~~
untog
I will never understand why push notification permission wasn't put behind
click activation like many others are. The span of that permission prompt is
very annoying.

------
reichardt
"2) State is maintained if it goes in the background. A bit buggy though, but
promising"

So happy about that! I almost thought Apple would deliberay cripple the PWA
experience on iOS just enough in order to not be competitive to native apps.
This is a huge step towards PWAs becoming a real contender in the app space.
Starbucks and Twitter PWAs show what's already possible. Very bullish on this
development.

~~~
pjmlp
Me too, I do favour native over Web, but there are a good set of applications
that can be made good enough with Web stack, without any FFI or build tooling
headaches.

------
blumomo
A dream of Steve Jobs is coming closer to his fulfillment. When presenting
iOS, he said that people will run web apps (in the browser).

~~~
reichardt
I'm in favor of PWAs but I never understood why Jobs originally planed to
distribute apps in such a open way. He must have known that this would
drastically limit Apple's power to decide what runs on customers devices. Do
you have more information on this?

Anyway, Apple seems to have changed their mind rather quickly after releasing
the App Store.

------
lettergram
It really bothers me that “Progressive Web Apps” are a thing. If Apple and
Google allowed it, there’s no need for a new paradigm - just let the browser
handle it. The same way slack sends notifications over the browser on desktop,
we could make use of.

Instead they want to control the interface, likely for their own gain, but
also som added security. So, I get it. However, the whole buzz word and
excitement is good, but it’s annoyingly stifled to begin with

~~~
IfOnlyYouKnew
I don’t quite getting what you are objecting to. Slack cannot send you
notifications when you’re not on the website, unless they have access to one
of the APIs commonly bundled under the PWA umbrella.

Is it just the name you’re objecting to? Do you believe it’s a bad idea to
strive for feature parity between native apps and the web? I seriously can’t
tell.

~~~
lettergram
Two things:

1\. Apple and google are going to set a new set of APIs. And likely edge out
the importance of other browsers.

2\. They went the app route to begin with... they could have always gone the
PWA route (especially the last few years). I don’t know why I have to have a
native app if the entire web is now mobile friendly.

~~~
lowtolerance
For what it’s worth, Apple didn’t go the app route to begin with. They were
all in on web apps on the iPhone, and had no plans to allow native app
development until developers demanded it. The iPhone didn’t have native app
support until around a year after it’s release. They thought browsers had the
capabilities necessary to make web apps mobile friendly enough to fill the
need at the time, but that was overly-optimistic.

------
mcintyre1994
I wonder whether there’s a difficulty in Apple about how much power to give
web apps in light of their privacy play. The browser isolates permissions -
Facebook can let me upload a picture in a chat without giving them permission
to all my pictures, their app can’t or at least doesn’t. If they had
notifications working for PWAs I’d probably drop Facebook Messenger for
example.

------
amluto
Is there a real primary source for this?

I’d like to know whether PWA developers need to register as developers with
Apple. Hopefully not, although I don’t see how Apple wants to prevent the use
of third-party payment systems without forcing everyone to get their apps
signed.

------
bellerose
The resuming state after leaving the PWA is awesome. My hobby project is a PWA
but has a bug now since the beta where all user interaction is lost when
resuming the state. I have a hunch it has to do with google maps and it's fun
trying to figure it out right now.

------
bitL
You still can't save local files with PWA...

~~~
Illniyar
sure you can, but the user must choose where to put it, no arbitrary saves.

[https://github.com/eligrey/FileSaver.js](https://github.com/eligrey/FileSaver.js)

~~~
bitL
[https://github.com/eligrey/FileSaver.js/issues](https://github.com/eligrey/FileSaver.js/issues)

Doesn't seem to be working well. A few people I know got burned trying to use
it and expecting universal functionality across all browsers.

~~~
Illniyar
Seems like regular browser compatability issues to me. Specific safari not
working, a few edge cases here and there. You have that in all cross browser
libraries.

~~~
bitL
With save the specific problem is that Mozilla guys wanted to move all save
capability to local DB + download, and to never allow writes to arbitrary
local files, treating it as a security issue, which obviously is a problem for
any sort of web apps running locally. Google tried to standardize FileWriter
API that never made it outside Chrome, then later dropped it due to
aforementioned issue.

------
menckenjr
Great. Now we can have app lookalikes built with someone's pet JS framework
contaminating our iPhones.

~~~
reichardt
"contaminating"? PWAs are contained a whole lot stricter than native apps.
Specifically on Android I would worry a lot less about adding a PWA to the
home screen than installing a native app.

Do you speak out against implementing apps in JavaScript or is your criticism
pointed at PWAs specifically?

~~~
coldtea
> _" contaminating"? PWAs are contained a whole lot stricter than native
> apps._

Contaminating as in "with their mere presence", doesn't have to be an
exploit...

