I’ve been using Shortcuts on iOS for years now (even back when it was called Workflow) and it's always been a key part to keeping myself organized and productive in my every day life. With every iOS release, more actions get added and the overall experience and functionality keeps getting better. Especially when the ability to send and receive data from other apps using x-callback-url's was added, this really unlocked the power of Shortcuts and how it can connect apps that were otherwise in isolation, well, until now I guess.
With the latest iOS 14 release, there's been a bug with the "Open x-callback-url" action, where the Shortcut fails when returning any data back to the Shortcut. Currently this bug is present when trying to launch Shortcuts from the share sheet that have this action.
Previously on iOS 13, for example, I was able to send and receive data with Pythonista via the following steps:
*This unfortunately is where it fails; when returning back to the Shortcut, you end up going to the home screen instead and the Shortcut times out.
There are also instances of this bug occurring even when data isn't being sent back to the x-callback-url action in Shortcuts. If you have the Drafts app, you can check out this example u/Stokkes posted on r/shortcuts.
If you have Pythonista installed on your iOS device, you can feel free to try this bug for yourself via the example below. There are other apps you can try this with (Drafts, Omnifocus or Scriptable for example, or even a plain URL will cause this to crash) but I am most familiar with Pythonista. See if the notification after the x-callback-url action will appear for you.
In this example, I'm sending the text "Hello World!" in Shortcuts via the query parameter to Pythonista, and having Pythonista send the data back to Shortcuts to display the text in a notification. Note, in order to experience the bug, you must launch this Shortcut from the share sheet.
You can add this shortcut to your library to test. There are instructions in comment blocks throughout the shortcut to help with any configuration you may need to do.
Some key notes to make this Shortcut work with Pythonista:
When you test, the shortcut is able to accept any input, so it doesn't matter what you choose so long as you launch the shortcut from the share sheet to experience the bug.
Paste this code in a file in Pythonista and save it in your iCloud folder. Be mindful of the iCloud path and that it matches your folder structure in iCloud.
This only affects Shortcuts being opened from the share sheet. So if your workflow requires running directly from the Shortcuts app's home screen, then you're covered. But if you're like me and can only use Shortcuts from the Share Sheet, then you might have to look for an alternative. From my experience so far, trying to launch other Shortcuts after this bug occurs causes issues which sometimes requires me to restart my device.
Before this action was great for apps and services that don't have a public API but have enabled the ability for linking via the x-callback-url directly on the device. And I mean if you can't use it from the share sheet, it kinda undercuts the power of what a Shortcut can do. So, if you're solely relying on retrieving data from these apps locally on your device this bug unfortunately prevents you from doing that.
Since I'm not the type to wait on Apple for a fix, I've been trying to figure out a workaround by trying to use apps and services that have APIs instead. I use a lot these scripts to make a lot of my manual tasks easier; whether that's with project management, or scheduling social media posts of my photos or blogs.
This brings me to my next project that I am starting to work on, which is converting all of these scripts on my device to be hosted on a server side setup. I plan on making a REST API, built on Django and hosted on Heroku.
I've previously done a similar implementation using Node.js but since a lot of my logic and libraries I'm using are Python-specific, I figured Django would be the way to go, but this is the first time that I'm trying it out. Looking forward to sharing more about the shortcuts and scripts I use every day and hopefully making a more robust solution.
Thanks to u/Stokkes on Reddit for originally posting about this on r/shortcuts when iOS 14 was first released. The Drafts example I included above was used from their example originally posted in this thread on Reddit.
What about you? Do you use Shortcuts this way through your share sheet and have you seen this issue occurring on your devices?