Looking to run a Needle site on an iPad somewhere that connectivity is not guaranteed, is it possible yet to build a Needle site as a Progressive Web App for iOS? Any documentation or tips on how to do so?
by user 103054507105067008
Looking to run a Needle site on an iPad somewhere that connectivity is not guaranteed, is it possible yet to build a Needle site as a Progressive Web App for iOS? Any documentation or tips on how to do so?
by user 103054507105067008
I realise I asked about this here already but hoping to test one out soon https://discord.com/channels/717429793926283276/1011401410128121886/1012673548235571210
by user 103054507105067008
Hi @ROBYER1 I would start by looking at this plugin for vite: GitHub - vite-pwa/vite-plugin-pwa: Zero-config PWA for Vite
I’m pretty sure you can do it manually by adding a manifest but if the plugin handles that automatically for you why not
Here’s a blog about it: https://css-tricks.com/vitepwa-plugin-offline-service-worker/
Thanks for the tips, have you tested it before? Just hoping it definitely caches the gltf part of the site too as that’s the most important bit!
by user 103054507105067008
Havent tested the plugin yet but if your app doesnt make any network request it should just work (the glb is not so different from loading an image locally)
Was just wondering if it would exceed the invisible cache size limits of safari/chrome etc on IOS/Android as I noticed a while back when trying to use Reading List to save Needle sites, they would work for a little while but after a while the OS would decide that the cached size was too large and the site wouldn’t work without the web
by user 103054507105067008
Sorry, didn’t get to make a proper PWA sample for you so far
I’ll hopefully try out one this afternoon using that vite plugin!
by user 103054507105067008
I think I got it working as the setup is very simple, however offline caching simply isn’t working, did you ever try it out for samples?
by user 103054507105067008
Will post back what I did if I get it working
by user 103054507105067008
I’ve got a PWA working here and it caches to work offline on Android via Google Chrome and Windows 10 desktop via Google Chrome but on IOS via safari it simply doesn’t cache when saved to home screen from Safari :S
https://demo.epm.digital/pwatest/
by user 103054507105067008
Apple ruining the fun for everyone - https://aatventure.news/posts/what-is-wrong-with-pwa-support-on-ios
“Service workers support is very limited compared to Android. You can only persist app data and cache its files (no background tasks). There is also a 50MB and “few weeks” limit for storage.”
https://stackoverflow.com/questions/71783032/ios-safari-webkit-current-state-of-pwa-persistence-as-of-version-15-2
“There is a 50MB service worker cache limit, but that does not mean you cannot persist more data. IndexedDB allows you to store a few GBs of data. It really depends, like other platforms, on the available space.”
by user 103054507105067008
Example project if anyone finds it useful!
by user 103054507105067008
Excellent, thanks for sharing!
I’ll look into the IOS caching more tomorrow, not sure why it doesn’t work as the project and build are tiny
by user 103054507105067008
Changed the channel name: How to make a Progressive Web App of a Needle Export? (PWA)
As a very important breakthrough and follow up to this, I recently learnt how to run a local web server on iOS with a Needle build in it using this tutorial https://beebom.com/run-simple-web-server-iphone/ which has opened up the doors to running AR Needle builds offline
by user 103054507105067008
With PWA, I was hitting roadblocks of cache expiring/local OS clearing out or enforcing a small cache size and I couldn’t set the app to cache forever. Now I have a means to run the app offline via a local server on the same device, PWA is useless for the use case of exhibitions or local app use
by user 103054507105067008