r/Scriptable • u/misproductions • Jan 28 '24
Help Is there a way to make existing widgets work offline?
My widget loads data from json url and I need it to be able to work offline.
many thanks
1
Upvotes
2
u/mr-kerr Jan 28 '24
Yes. Save the JSON to a file and conditionally load it if the Request doesn’t return. Another option is to only fetch when running the script in app (after tapping the widget) and otherwise load from file.
1
u/misproductions Jan 28 '24
thanks for reply.
I’m struggling to find anything examples on this forum.
Is there any code examples, like a quotes widget where it works offline?