Live data from Hacker News

Private client-side-only PWAs are hard, but now Apple made them impossible

andregarzia.com

531–540 of 927 posts

Re: Private client-side-only PWAs are hard, but now Apple made them impossible

#531
post #470
post #449

Earlier quoted context omitted.

I don't really understand this. If you want to make something local, make an app and distribute through the app store, that's what it is for. A web app on the other hand is connected by definition, no? Apple forcing local apps to distribute through the app store is a feature .

So you can think of absolutely no situation where a user would access a web app, and might want to store state info locally?

I can personally think of cases (not that PWAs have ever been anything but fragile when it comes to locally stored data), but as a user, the occasional clearing of super cookies is a bigger boon.

Re: Private client-side-only PWAs are hard, but now Apple made them impossible

#532

Earlier quoted context omitted.

If you read the article, that's the issue the author was talking about: it's basically impossible to make an app that can store its data locally, instead of on some web server. All apps that you download from App Store can live offline, where they're usable without Internet or trusting some faraway web server. You can't make a web app that can do that, and to some people it smells like Apple trying to force developer…

If you read the update from webkit.org, you'll see that it's still quite possible to store data locally. Link: https://webkit.org/blog/10218/full-third-party-cookie-blocki... Relevant quote (emphasis mine): > Now ITP has aligned the remaining script-writable storage forms with the existing client-side cookie restriction, deleting all of a website’s script-writable storage after seven days of Safari use without user i…

If a website hasn't been used for 7 days, I'm happy for its data to disappear and save space on my device.

You might be, but maybe not everyone is. I've worked on apps based around multimedia content where downloading in advance to watch or listen later was a big deal, because a typical user also travels a lot and might well be going away for longer than a week. Even if they can get the same data again next time they're online, it might still be much slower and more expensive for them to do that on an international data plan instead of back home.

Re: Private client-side-only PWAs are hard, but now Apple made them impossible

#533

Sounds like the solution is to add the app to your home screen. I don't think its reasonable for a browser to let any site I ever interact with to store data on my device indefinitely

It depends on the context.. For example, I use an invoicing web app that stores previously created invoices indefinitely in localStorage. This gives me the benefit of not having to manage login credentials and keeping everything client-side. It also gives the site's developers the benefit of not having to manage user accounts or server side state.

Without being able to use localStorage as a long term store, I'll have to register for an account, have to deal with them handling my data, etc. Losing the functionality of localStorage as a long term store has disadvantages.

Re: Private client-side-only PWAs are hard, but now Apple made them impossible

#534
post #482
post #449

Earlier quoted context omitted.

I don't really understand this. If you want to make something local, make an app and distribute through the app store, that's what it is for. A web app on the other hand is connected by definition, no? Apple forcing local apps to distribute through the app store is a feature .

> A web app on the other hand is connected by definition, no? No, not in the era of "progressive web apps", which is really just a little bit of branding around interconnected APIs. The Cache API in particular means that a webapp can be downloaded and made available offline on a permanent basis. Unless it isn't actually permanent at all, which is what Apple are doing here. The web and the App Store are just delivery…

Personally I would never expect a web app to be available offline on a permanent basis.

Re: Private client-side-only PWAs are hard, but now Apple made them impossible

#535

Earlier quoted context omitted.

If you read the article, that's the issue the author was talking about: it's basically impossible to make an app that can store its data locally, instead of on some web server. All apps that you download from App Store can live offline, where they're usable without Internet or trusting some faraway web server. You can't make a web app that can do that, and to some people it smells like Apple trying to force developer…

> it's basically impossible to make an app that can store its data locally, instead of on some web server. No, that is trivial to do: just make an actual damn application. What the author is complaining about is that it’s impossible to make a text document that pretends to be an application that stores data in ways they were never intended to be stored.

No, that is trivial to do: just make an actual damn application.

So trivial that all it needs is learning a completely new skill set and tools, signing up for a gated distribution mechanism that can kill your application on a whim if you violate any of the rules over which you have no control, and then giving a huge cut of your revenues to the rent-seeking platform owner?

The web has been more than just text documents since around the turn of the millennium. It's probably about time we stopped ignoring 20 years of very popular evolution and pretending that what might have been "intended" before a lot of people reading this comment were born should still guide what we build today.

Re: Private client-side-only PWAs are hard, but now Apple made them impossible

#536

Earlier quoted context omitted.

I'm the OP and I'm crying because I'm working on apps that don't have backend so that your data is yours and never leave your computer. This is now impossible for WebKit users.

So you have to track Apple users now if you would implement backend storage. How ironic.

Exactly. Now I'm working on PWA that stores address data locally and now I have to have a backend db just for Apple users.

Re: Private client-side-only PWAs are hard, but now Apple made them impossible

#537

Earlier quoted context omitted.

It is not fine if you're creating apps that don't have a backend.

Honest question - If you're creating an app like that, is a PWA really the right way to go? Aren't there other options available (such as creating a native app with a SQLite database)?

There's swathes of apps that will never be allowed on popular app stores (gambling, porn, sometimes apps that Google or Apple doesn't want competing with their own services). You can created a native app but it'll only be usable on Android.

Native applications also require acquisition of a Mac and a $99/year membership (iOS) and $25 (one-time fee for Google Play). A web application is mostly hosting costs which can be near free if you use the right cloud services.

I don't know of an alternative that will let me develop a small tool that will be free to develop and distribute, is not subject to restrictive store policies, works on desktop and mobile and is capable of things like accessing the device's camera and location when necessary.

I'm personally a fan of PWAs because they can't secretly write identifiers to my phone's SD card, they can't extract my contracts, they can't monitor my location in the background, etc. Sure, modern smartphone operating systems allow you to set up proper restrictions, but that puts the responsibility of making applications behave on me instead of on the phone.

Sure, native applications have their place (geofencing, native performance, file system access, system APIs) but in my opinion so do PWAs.

Re: Private client-side-only PWAs are hard, but now Apple made them impossible

#538
post #103

Earlier quoted context omitted.

But wouldn't that make it have less privacy? Now my webapp cannot be used offline and anonymously, user has to be logged in and tracked

It doesn't change the status quo. Important data wasn't put in cookies before, and it wont be after. It was always a recipe for data loss. Server side, or if you need privacy, have the user export to / import from a local file.

> have the user export to / import from a local file.

Exporting to local files does not work on iOS if the app has been saved to the home screen (it does work if it's loaded as a normal web page). This is likely a bug, but that's the way it is right now.

Re: Private client-side-only PWAs are hard, but now Apple made them impossible

#539
post #482

Earlier quoted context omitted.

> A web app on the other hand is connected by definition, no? No, not in the era of "progressive web apps", which is really just a little bit of branding around interconnected APIs. The Cache API in particular means that a webapp can be downloaded and made available offline on a permanent basis. Unless it isn't actually permanent at all, which is what Apple are doing here. The web and the App Store are just delivery…

Personally I would never expect a web app to be available offline on a permanent basis.

Okay?

Re: Private client-side-only PWAs are hard, but now Apple made them impossible

#540
Apple is at war against the open web and tries to kill it at all cost.

Most apple apps are privacy hogs which don't have any way to turn off tracking. In apps, Apple created a prison which noone can question and everyone will allow them to do all abuse. Look at Apple News.

Post reply on HN