How to automatically trigger a iOS Shortcut (based on location/calendar)
Unfortunately this is not possible (yet). It's a known limitation of Shortcuts in its current 2.0 implementation.
Federico Viticci mentioned this in his (epic) iOS 12 review as something he'd like to see in the future:
https://www.macstories.net/stories/ios-12-the-macstories-review/12/#content
After updating to the iOS 13, you can open Shortcuts (it's now installed by default). On the bottom menu there is a tab called "Automations". There, you can set triggers to start actions, just like normal shortcuts.
There are both triggers for location or date/time related events.
I was looking for the same thing, but I believe that running shortcuts automatically without user interaction is not going to happen anytime soon in iOS.
Since I never really liked how the workarounds felt like, I solved this problem for myself and made an app called Pushcut that integrates push notifications with shortcuts.
You can run linked shortcut with one tap on a notification, or define multiple options as actions. Not "automatic in the background", but as close as you can get with iOS.
I use it mainly with my openHAB home automation and IFTTT webhooks - but it is quite versatile. I hope somebody else finds this useful too.
I guess the best for now is, that you can add your own shortcut as a reminder. Then when it appears on the screen just tap on it and it will execute whatever, but it still requires some interaction.
https://support.apple.com/en-gb/guide/shortcuts/apdacfdf1802/ios
I was also trying to make the Shortcuts work without my manual input. I think due to security reasons Apple will not allow triggering Shortcuts without user action, though that's not specified in their iOS Security Guide. I've tried repeat
and wait
commands, but the shortcut stops execution if you turn off the screen.
There is a lot to do with Shortcuts app is it is, more integrations and apps to be added, stability and performance improvements required, so I think Apple will continue to work on the app itself and may add this feature much later.