A mechanism for automatically checking for and prompting the user to install a newer version of a shared iOS Shortcut.
This simple text file, hosted online, provides the latest version number and the sharing link for the updated shortcut. You must use a **direct URL** (e.g., GitHub Gist, plain text file on a server).
[VERSION_NUMBER]
[NEW_SHORTCUT_ICLOUD_LINK]
2.0
https://www.icloud.com/shortcuts/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Action Point: When you update the shortcut, you must **increment the number** on Line 1 and **replace the link** on Line 2, then save the file.
Place these actions at the **very beginning** of the shortcut you share. They run the version check before executing the main workflow.
Action: Text
Input: 1.0 (The version of this specific shortcut copy)
Action: Set Variable to LocalVersion
Action: Get Contents of URL
Input: **Your Hosted File URL** (e.g., https://example.com/latest.txt)
Action: Split Text by: New Lines
Action: Get Item from List at: **Index 1** (The version number)
Action: Set Variable to OnlineVersion
Action: Get Item from List at: **Index 2** (The iCloud link)
Action: Set Variable to NewLink
Action: If: OnlineVersion **is greater than** LocalVersion
Action: Show Alert
Title: Update Available! (v[OnlineVersion])
Message: A new version is available! Tap OK to install the update.
**Button:** Update Now
Action: Open URL
Input: NewLink (This opens the new shortcut install page)
Action: End If
[... The rest of your shortcut's actions start here ...]
Follow these two steps every time you refine your shortcut and want to distribute the new version.
| Step | Action | Result |
|---|---|---|
| **Generate New Link** | In the Shortcuts app, create a **brand new iCloud sharing link** for your updated shortcut. | A unique link (e.g., https://www.icloud.com/shortcuts/...) is generated. |
| **Update Web File** | Edit your hosted text file (`latest.txt`): **Increment the version number** and **paste the new link** over the old one. | The next time your friend runs the shortcut, the If condition will be met, and the update will be prompted. |