Is there a way to use Location from a widget?
When running from the app, I can get the location, but from a widget, I see this error:
I noticed that apps like Maps and Weather now have new permission under privacy: While using the App or Widgets
. Maybe Scriptable is missing this permission?
Update: Using non-beta versions of iOS 14.0 and Scriptable 1.5 (161)
Update 2: Here is a minimal script to demonstrate the issue:
let widget = await createWidget()
if (!config.runsInWidget) {
await widget.presentSmall()
}
Script.setWidget(widget)
Script.complete()
async function createWidget(items) {
let w = new ListWidget()
const latLong = await Location.current()
const loc = `${latLong.latitude}/${latLong.longitude}`
w.addText(loc)
return w
}