Script: Close Drafts?

I am trying to write a script that automatically closes Drafts.

More specifically, I want to use Shopping Mode on the iOS Widget, but would like to close Drafts automatically after disabling Shopping Mode to save the extra taps.

The script reference for app does not show any option here—any ideas?

Not possible.

In the sense that it’s just not possible on iOS. iOS does not provide any APIs that allow an app to put itself in the background and return to the Home Screen.

If you don’t mind the speed and jumpiness, you could call out to Shortcuts to switch to springboard.

I started with a shortcut that opens the Notes app.
The I made another shortcut that takes the first shortcut, saves it a a .plist file, then change the part that open the Notes app to SpringBoard. Then rename it back to .shortcut and import back to Shortcuts.

:astonished: Nifty idea.

However, it seems not to be working. When I add the “Run shortcut” step to the action, the action jumps to shortcuts app, then jumps back to Drafts. No Home Screen. Thanks for the idea though

That’s because that step is effectively running as a callback. You want to just call Shortcuts directly via a URL without the callback to return it to Drafts.

1 Like

Ah thanks! Didn’t even know that Shortcuts have a URL Scheme.

Ok, so here is the result in case anyone is interested: