Shortcut Launcher: Streamline the ‘Shortcuts App widget’

Shortcut Launcher is an iOS shortcut that has been designed to streamline the use of the Shortcuts App widget. In addition, it provides a method to categorize the Shortcuts App Library shortcuts.

It is convenient to launch shortcuts from the Shortcuts App widget. But as more shortcuts are configured to appear on the widget, valuable vertical space on the widget screen is filled since shortcuts appear only two abreast. Shortcut Launcher provides quick access to all shortcuts without sacrificing this valuable space.

Shortcut Launcher can be used as-is or, if needed, easily customized. The following videos include much more information:

Shortcut Launcher - Overview

Shortcut Launcher - Part 1: Features

Shortcut Launcher - Part 2: Configuration

All of the information in the two videos is also included in the Shortcut Launcher Comments and Import Questions.

Download Shortcut Launcher here. [superseded - 2018-10-03 Update below recommended]

Reddit Cross-Post here.


2018-10-03 Update:

During my recent use of Shortcut Launcher I encountered a nasty bug with iOS Shortcuts v2.0. If one has the following circumstances:

  1. a shortcut is launched from the Shortcuts App widget,
  2. the Shortcuts App Library is large (e.g., >100 shortcuts), and
  3. the shortcut executes the Get My Shortcuts action,

then the shortcut will sometimes not be able to render the list within the Shortcuts App widget. I was able to reproduce this bug with a very simple shortcut on my iPhone 8 Plus and my iPad Pro 10.5".

Interestingly, even with the above conditions, rendering native lists (within the Shortcuts App) is not a problem. Thus, one solution is to run the Continue Shortcut in App action before the shortcut attempts to render a list. Another solution is to use the Get My Shortcuts action in a helper shortcut, write the Library shortcut names to an iCloud file, and then in the widget-launched shortcut, read this file rather than use the Get My Shortcuts action. (Aren’t bugs like this fun?)

So…

I’ve updated Shortcut Launcher and created Shortcut Launcher (helper). [superseded - 2018-10-19 Update below recommended]

The updated version of Shortcut Launcher (dated 2018-10-03) includes two new Import Questions (Always Open Shortcuts App & Use Shortcut Launcher (helper)). [superseded - 2018-10-19 Update below recommended]

Always Open Shortcuts App

0 = No [default]
1 = Yes

2018-10-03: This import question and the next [Use Shortcut Launcher (helper)] were added to circumvent a bug sometimes observed when the ‘Get My Shortcuts’ action runs with a large Shortcuts App Library (>100 shortcuts). This bug only occurs when ‘Shortcut Launcher’ is run (tapped) from the ‘Shortcuts App Widget’, and can be identified by one of two behaviors: 1) no menu is generated, and no message appears, that is, this shortcut appears unresponsive to the tap; 2) no menu is generated and the following message appears: Unable to Load.

Use Shortcut Launcher (helper)

0 = No [default]
1 = Yes

If Always Open Shortcuts App = 1 (refer to the previous Import Question), then the ‘Get All Shortcuts’ action in this shortcut will never cause a problem, thus this setting will be ignored and ‘Shortcut Launcher (helper)’ will not be required.


This new version of Shortcut Launcher performs exactly like the original version (and the helper is not needed) if the default values (0 & 0) are used for the new Import Questions.

But if you are like me, and have a large Shortcuts App Library, you might have to adjust one of these new Import Questions. Since I like to render lists in the Shortcut App widget whenever possible, on my iPhone and iPad, I’ve opted to set these as follows: Always Open Shortcuts App = 0 & Use Shortcut Launcher (helper) = 1. (Note: The helper only needs to be run manually when a shortcut is added or deleted from the Shortcuts App Library. This isn’t ideal, but it really isn’t too bad as the helper runs very quickly and the new version of Shortcuts Launcher is snappier with these settings (reading and parsing one file seems to be faster than running the Get My Shortcuts action). (And, yes, I tried running the helper from Shortcut Launcher using the Run Shortcut action, but this performed no better than the original version that always ran Get My Shortcuts regardless of the settings.)


2018-10-19 Update:

Revised Shortcut Launcher and Shortcut Launcher (helper). [superseded - 2018-11-12 Update below recommended]


Shortcut Launcher Revisions:

a) Improved comments throughout.

b) No longer ignore Use Shortcut Launcher (helper) Import Question if Always Open Shortcuts App = 1 because the former can be used to improve performance if the shortcut Library is large.

c) Changed the name of Import Question Continue Shortcut in App before Launching Shortcut to better describe its function.

d) Added a new Import Question Ignore Categories that can be used to ignore Category items in the Dictionary (=1) or be used to bypass the first list completely (=2). 1 & 2 provide two simplified modes of operation: this shortcut can be used without modifying the Dictionary action and without changing the names of any shortcuts.


Shortcut Launcher (helper) Revisions:

- Fixed a typo in the alert


2018-11-12 Update (RoutineHub v1.0):

Revised Shortcut Launcher and Shortcut Launcher (helper).


Shortcut Launcher Revisions:

a) Uploaded this shortcut, Shortcut Launcher, and Shortcut Launcher (helper) to RoutineHub.

b) Included UpdateKit, but only run the update check if Shortcut Launcher is launched from Shortcut Launcher (helper). For future updates (of v1.0 or greater) of Shortcut Launcher, before the update check, the Dictionary action values will be saved to /iCloud Drive/Shortcuts/Shortcut Launcher (helper)/Dictionary-Shortcut Launcher_v[version].txt and to a new note in the Notes app. Thus if the Dictionary action default values were previously changed to customize the behavior of Shortcut Launcher, the changes can be more easily restored by returning to the new note (or opening the text file) and then copying the customized values back to the default Dictionary after the Shortcut Launcher update.

c) Changed Use Shortcut Launcher (helper) Import Question default value to 1.

d) If Use Shortcut Launcher (helper) = 1, but it appears that the helper has not been run on the device, check for it. If it is not found, offer to download it; if it is found, run it.

e) Shortcut Launcher (helper) now writes to an iCloud folder based on its name, not the name of Parent (this shortcut). This change was made to better accommodate cases where a user might have more than one copy of this shortcut with different Dictionary settings, e.g., Shortcut Launcher - Categories and Shortcut Launcher - Shortcuts. Note, only one helper shortcut (i.e., Shortcut Launcher (helper)) is required for all Parents. But there is a Text action at the top of the helper that must be modified to add each Parent name.

f) Checks the version of Shortcut Launcher (helper) last run; if it is older than the version specified in this shortcut, the latest version is downloaded.

g) Prior to this version, Dictionary entries with an undefined value (e.g., X) were assumed to be Category items. They are now ignored. This provides a method to easily disable a Category or Shortcut but leave it in the Dictionary for subsequent reactivation.

h) Changed Match Text Pattern from [^ \t]{1} to ([^\s]+). The original pattern was defined to return the first non whitespace character. For almost all emojis, this worked as expected. But for a few emojis (e.g., :star:, #⃣) the result would be different than the emoji. For example with #⃣ XYZ, the first pattern would return #, not the emoji hashtag. Thus the Match Text Pattern was changed to find all characters up to the first space.

i) In the Dictionary, modified the example CategoriesC’ to ensure that all had at least one space after the leading emoji.

j) For the [ Filter by Shortcut Name ] option, trimmed leading and trailing whitespace from the user’s response. Also, in the prompt, warned that the search is case sensitive.

WARNING: If you have used a previous version of Shortcut Launcher (prior to v1.0, 2018-11-12) and you modified the Dictionary by adding your own CategoriesC’ or ShortcutsS’, consider renaming the previously used version before downloading this version. Once v1.0 (or later) is modified, this precaution will not be necessary as the Dictionary settings will be copied the the file and note as mentioned above.


Shortcut Launcher (helper) Revisions:

a) Uploaded this shortcut, Shortcut Launcher (helper), and its Parent Shortcut, Shortcut Launcher, to RoutineHub.

b) Added UpdateKit check every time this shortcut is run.

c) By default, the Parent Shortcut is Shortcut Launcher. But some users might choose to have multiple copies of the parent, each with different Dictionary settings. In all cases, however, only one copy of this helper shortcut is required.

d) At the end of this shortcut, if the version of this shortcut has changed, run the Parent Shortcut(s) passing integer 1. The Parent(s) uses UpdateKit also, but only makes an update check when it is passed this 1. Thus, the Parent(s) bypasses the update check when it is routinely run by the user.


2018-11-14 Update (RoutineHub v1.1):

Revised Shortcut Launcher and Shortcut Launcher (helper).

For future revisions, refer to the Latest Release Notes in RoutineHub.

5 Likes

Cool. I posted something very similar a few months ago in this thread:

3 Likes

Thanks for pointing that out. After posting in the /shortcuts subreddit, I found out /u/heeervas had also done something similar.

Also, thanks for pointing out the How do you organize your workflows? thread. I’ll add an entry and point to Shortcut Launcher.

2 Likes

Out of curiosity do you know of any documentation of what works in widgets and what doesn’t? lists and number inputs do, text and url and date inputs don’t (I.e. you get flipped back to the app).

Here’s the Shortcuts User Guide but I don’t see any guidance on that matter. Maybe someone else knows; I just do it by trial-and-error.

Nice work gents! I’ll be trying these out!

1 Like

I updated the original post. See the 2018-10-03 Update section.

And I just noticed another Shortcuts v2.0 anomaly. It appears that if you have a shortcut with Show in Widget set OFF, and then share it using Copy iCloud Link, and then download the shared version, the downloaded version has Show in Widget set ON. (This is what happened when I shared Shortcut Launcher (helper) in the original post.)

What do you think - did Apple do this intentionally or is this another bug?

Every custom shortcut created in the app defaults to show in widget. Regardless of how it’s created I believe. If it isn’t a bug, it is certainly frustrating.

2 Likes

I updated the original post again. See the 2018-10-19 Update section.

Just a guess, but given the nature of what you describe I think you’re more likely to be hitting the widget memory constraint than this being a bug.

Typically for that scenario, the solution, as you identified :sunglasses:, is to use the continue shortcut in app action. This used to be the case for Workflow before Shortcuts, and was noted publicly by the Workflow team at that time.

1 Like

I suspect that it is a memory issue; I’m seen similar issues with other app widgets. So to call this a Shortcuts bug might not be accurate. It’s likely an iOS widget limitation: maybe the widget API does not report back memory constraints, thereby making it impossible for apps to report an error.

The good news is that both are now in Apple’s camp, so maybe it will be addressed.

Hi, I really love Shortcut Launcher and am enjoying finding/creating more shortcuts to personalize it. Recently I created a new category called “#️⃣Instagram Hashtags” and my shortcuts are named “#️⃣Night” etc. The thing is they don’t show up. I don’t have over 100 shortcuts but I use the shortcut launcher helper anyways so they definitely should be in the lists because I ran the helper after creating the category and renaming the shortcuts. What happens after I press on “#️⃣Instagram Hashtags” is I get an error message saying “Shortcut Not Found” “Make sure a valid shortcut is selected in the Run Shortcut action”. Could I get some guidance on how to find and fix this issue, thank you very much!

Check the Chosen Shortcut variable value.

It must exactly match the name of your shortcut. Any extra spaces for example (between the icon and text, at the start, at the end) would mean a mismatch.

I’d be tempted to do a clipboard based comparison. Copy the Chosen Shortcut content and compare character by character against a copy of the nae of the actual custom shortcut.

Hope that helps.

Thank you for the suggestion. But it can’t be the name, I added a category item to the dictionary and the shortcut isn’t adding the shortcuts with the same indication emoji to the category. So there is no name to match/mismatch

@Rich_Bihler, the following should address the issue you observed:

In Shortcut Launcher v2018-10-19 there are two Match Text actions. Change the Pattern from [^ \t]{1} to ([^\s]+) in both actions.

Note, however, this will only function properly if there is at least one space after the leading emoji in all of the category entries in the Dictionary action. (All of the example categories in Dictionary action meet this requirement.) There is no such space requirement in the name of your shortcuts.

In summary, after making the Pattern changes mentioned above, in the Dictionary action, enter the category as: :hash: Instagram Hashtag. Note the space after :hash:. Shortcut names can have a :hash: anywhere in their names.

After I do some additional testing, I’ll release a new version of Shortcut Launcher.

Thank you!!! So just to clarify, if there were no bug and I did enter the category and shortcut names correctly, then the only editing i need to do is add the category and the same emoji in the name of the shortcut, correct?

That’s correct, with one caveat. If you make the Pattern change I mentioned above (which I recommend), then be sure all category specifications in the Dictionary action include at least one space immediately after the emoji.

Ah totally misread that. I changed the Pattern and now it pulls up the shortcuts! Thank you so much. I’m excited for what happens with future versions of this shortcut and the app!

I updated the original post again. See the 2018-11-12 Update section.

10%20PM

Hi @RosemaryOrchard. I updated this post earlier today and since I’ve seen this. What does this indicate? Thanks!