For All Mindkind

Posts tagged with "URL Scheme"

Automating iOS: A Comprehensive Guide to URL Schemes and Drafts Actions

I started teaching myself how to build and run URL actions with Drafts in early 2013, when I decided to attempt to satisfy Federico Viticci’s Challenge to chain more iOS apps together than he had. I spent a few days feverishly searching for information on URL schemes, learning how to build actions and run them through the Drafts URL action engine, and figuring out the best way to create a chain which connected more than Federico’s record of three apps. When I triumphantly sat back and watched my iPad run an action sequence automatically chaining five apps together (Drafts, Dropbox, Due, Instapaper and Chrome), I had no idea that it would lead to an article being written about me here, starting a blog to have a place to write about the actions I was building, an opportunity to beta test Drafts, and the chance to connect with all kinds of interesting, like-minded people from all over the world.

Since that time, less than a year ago, iOS automation has exploded in power and popularity. It feels like a new app adds support for x-callback-url almost every week. Drafts still stands tall as one of the front runners in the field, having added awesome new features to make far more powerful workflows possible since last February, but other apps compete as well. Launch Center Pro and Pythonista are notable, and the latest challenger, Editorial for iPad, rode in on a blaze of Viticci-inspired glory. So much has changed since the beginning of last year, but there’s one important aspect which, surprisingly, has not. While the field of iOS automation has paraded forward, the gateway into the fun, learning the skills to understand and build the URL actions that make inter-app communication possible, has remained almost unchanged. Information is more readily available from the introduction of many new sources, but it remains scattered and decentralized. The inner workings of URL schemes are not incredibly complex, but when interested individuals must spend hours searching for the right sources all across the internet, the process becomes confusing, boring, and far more time consuming than necessary.

Since I first started The Axx (and created The Action Page as a place to make my actions available to anyone who wanted them), I have been asked again and again if I knew of a place to go to quickly and easily learn how to understand and build these actions. I have grown tired of having no good answer to this question. As a result, I have decided to take my best shot at creating a source for that answer. This article will attempt to centralize all of the necessary information for a complete beginner to quickly and easily go from little to no prior knowledge of the subject to being able to understand and build their own complex workflows with Drafts and URL actions. I will only be focusing on Drafts here, but the skills learned throughout this guide should be easily transferable to other apps, like Launch Center Pro and Editorial. For intermediate, and perhaps even expert action-builders, I will hopefully have some tips that will interest you as well in the last few sections of the article.

Before we begin, be sure to enable the “Allow URLs to trigger actions” setting (found almost all the way to the bottom of the settings pane in Drafts under “URL Security”), which is disabled by default. This setting will allow you to trigger actions externally via URL, a key component to chaining apps together with Drafts, or using apps like Launch Center Pro or Bookmarklets in Safari to run Drafts actions automatically.

So here it is, my Comprehensive Guide to URL Schemes and Drafts Actions. Read more

Save Photos As Reminders with Fantastical and Launch Center Pro

Fantastical and LCP

Fantastical and LCP

I recently realized that I wanted a way to quickly save photos or screenshots as todos, and being Fantastical 2 my todo manager (with Reminders) and Launch Center Pro the fastest way to take pictures and upload them to Dropbox, I combined them in two workflows.

I made two simple actions that mix the Launch Center Pro and Fantastical URL schemes to save a Dropbox image link as a reminder in Fantastical. You retain the ability to type natural language in a Launch Center Pro prompt, and Fantastical will also automatically recognize the URL and put it in the URL field of a reminder.

Some details worth noting about the actions:

  • The first one lets you take a new photo; the second one grabs any image from the Camera Roll;
  • Both actions will upload an image to Dropbox in the Photos/LCP/ folder; you can change this once you install the action;
  • Fantastical is set to create a reminder for the received text through the reminder=1 flag in the URL scheme.

Getting all the encoding right was a bit tricky at first, but the actions should work without any further configuration on your end. Feel free to modify them: with my basic structure in mind, you can replace Fantastical 2 with Drafts, Dispatch, or any other app that can receive text via URL scheme. I just find it handy to be able to quickly save photos in Fantastical as tappable links, but the workflow is really up to your imagination.

You can download the actions here:

Terminology Workflows For Editorial

Greg Pierce:

Terminology has always had great direct integration with our own apps, Drafts and Phraseology that allows you to easily lookup and select replacement words and have them directly replaced inline with your editing. You can see that integration in action.

In the latest version (3.0.6) of Terminology, I added a tweak to its URL schemes to allow it to integrate more easily with certain other apps, particularly Editorial, Ole Moritz’s excellent iPad text editor.

Terminology is my favorite dictionary app and I wish Editorial had a popover to replace Apple’s default dictionary, like Instapaper did. The workflows are the best alternative to that for now, and they work well.

It would be nice to have selectable synonyms and antonyms built into the system dictionary in iOS 8.


Launch Center Pro 2.1: Fleksy Keyboard, Lists, Photo Attachments, and Share Sheets

Launch Center Pro 2.1

Launch Center Pro 2.1

In October, Contrast released Launch Center Pro 2.0, a free update to their shortcut launcher and automation tool for iOS that brought a new interface for iOS 7 and, among other minor additions, Dropbox integration. Launch Center Pro is one of the three apps I keep in my dock[1], and I use it several times a day to create new tasks in Fantastical, launch Google searches, open my favorite websites, and more.

Today, Contrast is launching Launch Center Pro 2.1, a seemingly not-so-major update that, however, brings important changes to the app, including a new way to build visual actions and support for the new third-party Fleksy keyboard. I don’t think it’s an exaggeration to say that version 2.1 is just as important as 2.0 for heavy users of Launch Center Pro. Read more

TextTool: Text Manipulation On iOS



It used to be that, to do nerd stuff, you had to get a Mac or PC. As iOS progressed over the years, however, developers saw that users were spending a lot of time trying to do work on their iPhones and iPads, and started building utilities that packed powerful functionalities in what looked like “just an app”. We got Drafts and Launch Center Pro, calendar apps and password managers just as powerful as their desktop counterparts, and, of course, apps to script iOS and a text editor with its own workflow system. To sum up: iOS is still maturing, but there’s no shortage of nerdy apps and utilities at this point.

iOS is great for quick text entry thanks to the portability of an iPhone or iPad mini, but doing advanced text manipulation is a bit tricky unless you want to get dirty with Editorial and Python scripts. On the Mac, it’s easy to fire up Automator and create a workflow that takes a line of text and turns it Into Title Case or UPPERCASE; even going the extra mile and building services to take selected text and indent it or swap spaces with tabs takes a few minutes, but it’s doable with a basic knowledge of built-in OS X tools. On iOS? There’s no Automator (yet?), so, until today, if you wanted to do automated text transformations you’d have to get Editorial and Pythonista or use some of Launch Center Pro’s (limited) text filters.

Craig Pearlman noticed this problem and built TextTool, a $4.99 Universal app that comes with 28 built-in text transformations that you can use inside the app’s text editor or chain to other iOS apps with URL schemes and workflows.

Read more

Resolve and Clean URLs with Clean Links for iOS

Clean Links

Clean Links

In July, I wrote about my Pythonista script to resolve and clean URLs copied from apps that used shortening services. Clean Links, developed by Griffin Caprio, is a free iOS app that does more than my script as it resolves URLs, removes useless parameters, and supports x-callback-url for inter-app communication.

Clean Links’ sole purpose is to receive a URL that was shortened, put behind a proxy, or cluttered with parameters/tokens and turn it into the clean, basic version that’s the one you want to share with your friends and followers.1 Clean Links can resolve YouTube URLs, links to blog posts generated by FeedBurner, classic Bitly URLs, and more. In my tests, Clean Links never failed to clean up a URL that I gave to it – the recent addition of YouTube URL support is extremely welcome as YouTube mobile redirects are particularly annoying. By default, Clean Links cleans a URL you’ve copied and puts the cleaned version back in the iOS clipboard.

With callbacks, Clean Links can be used with other apps as a “URL cleaning service” in the middle of a workflow. Here’s an example: I’ve found a link in Tweetbot and I want to tweet it, but the URL is ugly. With Clean Links, I can copy the URL and launch this Launch Center Pro action to have it cleaned up and return to Tweetbot’s Compose screen automatically. Or, with this action, you can resolve a URL and automatically add it to the “URL” field of a new event in Fantastical 2.

A tip for x-callback-url power users: when chained to other apps, Clean Links can automatically insert text not by using clipboard hacks, but through a “return parameter” called retParam. If you take a look at the URL schemes that power the actions above, you’ll see that, for Tweetbot, the text parameter is omitted from the Tweetbot URL scheme and given to retParam (same concept for Fantastical). If you want to pass along cleaned URLs with x-callback-url keep this in mind and take a look at the app’s documentation.

Clean Links has a very utilitarian approach to the problem it solves: it’s powerful, but it doesn’t come with a pretty UI for iOS 7. You’re not supposed to be looking at Clean Links all the time though, and the app’s functionality makes it the best solution to clean URLs and send them to other apps I’ve found. Clean Links is Universal and available for free on the App Store.

  1. Tweeting URLs with “mobile.” domains and UTM tokens is comparable to this↩︎

Tweetbot Workflow: Upload and Share Dropbox Text Files

Tweetbot workflow

Tweetbot workflow

In Tweetbot 3, Tapbots removed the ability to post tweets longer than 140 characters using built-in services for text upload. While I understand that it wasn’t one of Tweetbot’s most used features, its removal got me thinking: would it be possible to replicate the feature using Dropbox and plain text files in an automated iOS workflow? I came up with a solution that requires Launch Center Pro and Drafts, and I’m quite happy with it.

Read more