🔗 Self-Updating iOS Shortcut System

A mechanism for automatically checking for and prompting the user to install a newer version of a shared iOS Shortcut.


1. 🌐 The Hosted Update File (Server Side)

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).

File Content Structure:

[VERSION_NUMBER]
[NEW_SHORTCUT_ICLOUD_LINK]
        

Example File (`latest.txt`):

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.


2. 📱 The Shortcut Logic (Client Side)

Place these actions at the **very beginning** of the shortcut you share. They run the version check before executing the main workflow.


3. 🚀 Your Update Routine

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.