loomchild / sojourner-web

FOSDEM conference companion PWA
https://sojourner.rocks
GNU Affero General Public License v3.0
51 stars 6 forks source link

Enable persistence on iOS 12.1.2 fails #11

Closed neuhaus closed 5 years ago

neuhaus commented 5 years ago

Any idea why I can't enable persistence? I've created a bookmark on the home screen and launched the app from it. I can see that it uses 2.7mb of storage in the Mobile Safari settings.

neuhaus commented 5 years ago

By the way, when I bookmark the app https://sojourner.loomchild.net/ on iOS and add it to the homescreen, it lacks a pretty icon.

loomchild commented 5 years ago

Hi, Thanks for contacting me.

I will try to test on iOS device, but I haven't got much experience with this environment, sorry. It's also a bit tricky on Firefox Mobile - see the description on Settings page. Maybe you need to do something similar for iOS - perhaps search for generic instructions, as support for PWA on iOS is pretty recent I believe.

In fact I wanted to rewrite the part responsible for storage and use Firebase instead of local persistent storage. This will permit synchronizing between devices, but will require creating an account and sharing the data with a central server. However there isn't much time left for the conference, so I am not sure if I will be able to pull it off this year.

Jarek

loomchild commented 5 years ago

Hi,

This weekend I deployed a new version that allows you to log-in and store the data in central DB, so persistence is not necessary to avoid losing data anymore. Feel free to give it a try.

I haven't researched the iOS persistence subject much, sorry. I can recommend visiting the page a few times, bookmarking it and trying to request persistence again (had some trouble with Firefox as well, but now it works again).

I also added a specific icon for iOS - let me know if it helps.

Jarek

loomchild commented 5 years ago

I tested on iPad and also wasn't able to get the persistence. From what I understand this particular API is not available in Safari, but Safari generally won't try to delete user data (there seems to be a difference between MacOS and iOS). I don't have a Mac to debug it, will look into this for next year. For now I believe the workaround to log-in works as expected, it's also possible to add the app to the home screen.

neuhaus commented 5 years ago

Thanks!