How to Launch Deep Links with Open URL in iOS 12
The introduction of the Shortcuts app in iOS 12 made it possible to automate everyday tasks on your iPhone or iPad, including navigating directly to specific views inside installed applications using deep links. This guide explains how deep links work in iOS 12, how to configure the URL and Open URLs actions inside the Shortcuts app, and how to verify that your custom URL schemes trigger the intended apps seamlessly.
Understanding Deep Links in iOS 12
A deep link is a uniform resource identifier (URI) that links to a
specific location, state, or feature within an app rather than simply
opening the app's home screen or a standard web page. In iOS 12, deep
links generally rely on custom URL schemes registered by developers
(such as twitter:// for Twitter, spotify://
for Spotify, or prefs:root= for specific Settings panels).
When iOS detects an authorized scheme, it hands off the request to the
matching native application.
Step-by-Step: Setting Up the Open URL Action
To open a deep link via an automated shortcut in iOS 12, follow these steps:
- Launch the Shortcuts App: Open the Shortcuts application on your device running iOS 12.
- Create a New Shortcut: Tap the Create
Shortcut button (or the
+icon in the top-right corner) to open the shortcut editor. - Add the URL Action:
- Tap the search bar at the bottom and search for URL.
- Under the Web actions category, select URL.
- Enter your target deep link into the text field (e.g.,
tweetbot:///timelineoryoutube://).
- Add the Open URLs Action:
- In the search bar at the bottom, search for Open URLs.
- Select Open URLs from the results. It will automatically connect directly below your previously defined URL action, passing the link as an input variable.
- Name and Save:
- Tap the settings/slider icon in the upper-right corner.
- Enter a descriptive name for the shortcut (e.g., "Open App Timeline").
- Tap Done.
Testing the Shortcut
Tap the Play button at the top of the workflow editor to test the execution. If the URL scheme matches an installed application on your iOS 12 device, iOS will automatically launch the target app and jump to the specific location defined in your URI.
Requirements and Limitations
- App Installation: Deep links using custom schemes will fail silently or display an invalid URL error if the destination application is not installed on the device.
- Syntax Precision: Ensure parameters, query strings,
and path slashes match the developer's exact documentation (e.g.,
omitting
://will cause the action to treat the input as an invalid web address). - Universal Links: If you are using standard HTTPS universal links instead of proprietary URI schemes, the Open URLs action will open the corresponding app if it is installed, or fall back to Safari if it is not.