Deprecated: Return type of I::current() should either be compatible with Iterator::current(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/public/kirby/toolkit/lib/i.php on line 62

Deprecated: Return type of I::next() should either be compatible with Iterator::next(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/public/kirby/toolkit/lib/i.php on line 91

Deprecated: Return type of I::key() should either be compatible with Iterator::key(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/public/kirby/toolkit/lib/i.php on line 71

Deprecated: Return type of I::valid() should either be compatible with Iterator::valid(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/public/kirby/toolkit/lib/i.php on line 101

Deprecated: Return type of I::rewind() should either be compatible with Iterator::rewind(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/public/kirby/toolkit/lib/i.php on line 53

Deprecated: Return type of Collection::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/public/kirby/toolkit/lib/collection.php on line 80

Deprecated: parse_str(): Passing null to parameter #1 ($string) of type string is deprecated in /home/public/kirby/toolkit/lib/url.php on line 135
One Tap Less | Schemes — URL Actions, Finally Simplified

Schemes — URL Actions, Finally Simplified


Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in /home/public/kirby/toolkit/lib/str.php on line 506

Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in /home/public/kirby/toolkit/lib/str.php on line 506

Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in /home/public/kirby/toolkit/lib/str.php on line 506

Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in /home/public/kirby/toolkit/lib/str.php on line 506

Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in /home/public/kirby/toolkit/lib/str.php on line 506

Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in /home/public/kirby/toolkit/lib/str.php on line 506

Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in /home/public/kirby/toolkit/lib/str.php on line 506

Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in /home/public/kirby/toolkit/lib/str.php on line 506

Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in /home/public/kirby/toolkit/lib/str.php on line 506

Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in /home/public/kirby/toolkit/lib/str.php on line 506

Let me share a secret with you: url encoding sucks. Some actions I post rely on verbose urls, undecipherable code you just ignore and seek for the button to install the action and call it a day. If you ever tried, you know it is hard and inevitably down to trial and error, but those days are over. Schemes is an interface to build url actions with drag and drop, just throw apps in the canvas and link them in any order to build workflows from the simplest to the most complex imaginable.

Upon iOS 8 announcement, I assumed the days of x-callback-url were over in favor of native extensions. Apart from remarkable integrations, such as 1Password, the new feature didn’t knock me off my boots. Then came Workflow and proved there was still room for automation on iOS and it nailed by being as powerful as it is simple.

Making url actions appeal to regular users has always been an itch for developers, The latest releases of Launch Center Pro and Drafts, for example, brought many interfaces to what previously would only be achievable with cumbersome urls. Schemes is the interface to tie all these apps together and build url actions as easy as you draw a mind map.

The video shows how to create an action to capitalize the first letter of every word of a sentence using TextTool and sending the result to Drafts. Think how simple that is compared to how you're used to do url actions and, most importantly, how you can increase complexity just by dragging another app into the chain. Wanna run an action on Drafts and return to Schemes? Just add your action to Drafts, drop Schemes onto the canvas and link them. You'd be on the third level of url encoding by now and, as you know, they work like the dream world in Inception: the deeper you get, the closest you are to limbo.

The core of Schemes is the action builder, split between the canvas and a row with all the apps available. You'll be prompted as you open Schemes for the first time to add the configurations from apps in your device. Drag an app to the canvas, it will have ellipsis over the bottom of the icon, meaning there's no action set to that app yet. But before getting into that, drag the home icon into the app you placed and — voilà! — you connected them. Rinse and repeat as you need to fulfil your crave for automation.

Chaining multiple apps requires x-callback-url support, check the library for a full list, but as you chain multiple apps, you'll realize that Schemes does more than a straight chain triggered by succeeded actions, you can also split your workflow in case of error or cancelation if the apps support it.

Editing actions

Every app you drop on the canvas has specific actions, tap on them to open the Application Workflow panel. Some actions have arguments, such as setting the text you want to send to Drafts, and they'll be available below the actions list. Setting an argument is where Schemes stands out, offering a myriad of macros, some of them unique.

The Application Workflow panel showing arguments.

These "macros" work like Launch Center Pro's [prompt] or Drafts' [[title]]. Template tags in Schemes are wrapped in curly brackets instead of square brackets and their options can be altered by stacking arguments with a vertical bar. Fasten your seat belts because we'll cover each one of them.

Ask

Equivalent to LCP’s [prompt-return] with large customization, the syntax looks like this:

{ask|title|multiline|default text|keyboard|autocorrect|autocapitalization}

Setting a title, as you would in Launch Center Pro with [prompt:Title] goes as {ask|Title}. Creating a single-line entry, like the regular [prompt] on LCP is {ask||single}. Notice the extra vertical bar there because we skipped the title, you can omit the vertical bars that come afterwards though. The {ask||single} option is also the second icon in the extra row, the one that looks like a Terminal window.

You can also add a prefix or suffix automatically to your text using {ask||prefix:suffix}, where you replace prefix and suffix with the term of your choice (or omit any of them). This can be used to recreate the behavior from [prompt-list] if you use {ask||:,} with small differences on how each app includes the suffix.

With the adjustment to a default text to your prompt also comes the ability to manipulate the cursor, so what you’d achieve on Launch Center Pro with [prompt-return=Cursor before \|this] can be achieved in Schemes with {ask|||Cursor before ^!this}.

Things can be overwhelming as you dig this macro, so be sure to check the Help files for more options. For now you can use this table as reference between Launch Center Pro's and Schemes' text inputs.

Choose

Equivalent to LCP's [list] and pretty much the same thing, what you'd build in Launch Center Pro with [list:Title|First Option=1|Second Option=2] is {choose|Title|First Option=1|Second Option=2} in Schemes.

Clipboard

This one is straightforward, {clipboard} inserts the text stored in your clipboard, which can be achieved with [clipboard] on Launch Center Pro or [[clipboard]] on Drafts.

Contact

The {contact} tag from Schemes allows you to set options and look for them in a Contact Picker. Here's the format:

{contact|Title|Type}

If the type is omitted, it falls back to name, which returns the selected contact's name. The other options are email, phone and id. The latter returns the ABID for apps such as WhatsApp as [contact-abid] in Launch Center Pro.

Date

The date tag adds a timestamp like Drafts' [[date]]. By default it outputs an ISO 8601 string, but can be formatted using strftime. For example, {date|%m/%d/%y} outputs for the publishing date of this article 03/14/15. Notice that the {date} tag doesn't have the Title parameter.

Datepicker

The {datepicker} lets you pick dynamic dates and format them accordingly to the syntax used by the apps you use. If you use GoodTask, you want something like this:

goodtask://x-callback-url/add?title={ask|Your task, sir}&due={datepicker|When is it due?|%F %R}

If you're confused about %F, it is just a shorthand for %Y-%m-%d, which outputs YYYY-MM-DD, while %R stands for the time in a 24-hour format, HH:MM. But what about Due? It uses something called epoch for its duedate parameter. Epoch is the number of seconds since January 1st, 1970 00:00.

due://x-callback-url/add?title={ask|Your task, sir}&duedate={datepicker|When is it due?|%s}

Text Expander Snippets

As you can expect these days, Schemes has TextExpander support, like [textexpander:abbr] in Launch Center Pro or <<abbr>> in Drafts. Use {snippet|abbr} to expand the abbreviation into the snippet.

Inherited tags

For example, when you trigger a TextTool transformation, you can send the result as x-success using the [[output]] tag and Schemes covers you there. As you could see from the video, I add TextTool output in a single tap as the text in Drafts. If the app offers more than one tag, you'll be prompted to select one.

There's more

This article should cover the basics to build actions with Schemes, but there are still more features for power users, such as variables and functions1, which I intend to dedicate an entire post about.

Craig Pearlman, the developer of Schemes and TextTool, has been trying to put this app, a 2 years effort, out for the past 6 months, but stumbled upon, roll the drums, Apple review and got stuck in limbo until now. I was there with Craig since the beginning and lived all the ups and downs, the disappointment with Apple's response was general and hope was gone. Craig shook it off and re-built most of the interface to comply to Apple's arbitrary restrictions. Schemes has an history and we should all applaud Craig's dedication.

If you ever struggled with url actions — and I bet most of you did — then Schemes is a no-brainer, it puts apps at your fingertips and makes x-callback-url a breeze. It is the app to connect all other apps and, from now on, no party is complete without it.


  1. There are still some bugs here, so hold your excitement.