Mr. Reader And The Services Menu for iOS

A “services menu for iOS” is a chimera advanced users and developers have long been trying to hunt down. It all started with a mockup Chris Clark posted in 2010, showing how third-party iPhone apps could offer their “services” – just like OS X apps – to the user through a contextual menu. The concept became popular fairly quickly, but, eventually, Apple did nothing.

Fast forward to 2013, iOS users are still asking for better integration of third-party apps with each other. Developers have resorted to using URL schemes, a rather simple way to directly launch other apps and pass information to them – usually bits of text. App Cubby’s Launch Center Pro has become the de-facto solution to create a “Home screen of app shortcuts”, offering a series of tools (such as automatic encoding and different keyboards) to make the process of customizing URL schemes as user-friendly as possible. Launch Center Pro is, in fact, the utility behind many of my favorite iOS tricks.

Pythonista has also become a big part of my iOS automation workflow. Combining the power of Python with the possibility of launching URL schemes, I have created a series of scripts that help me get work done on iOS on a daily basis. Further leveraging Greg Pierce’s x-callback-url, I have ensured these scripts can take a set of data, send it to other apps, process it, then go back to the original app. You can read more about Pythonista in my original article, and I’ve been following updates from developers who implemented URL schemes as well with a dedicated tag on the site.

I concluded my Pythonista article saying:

I believe that, going forward, Pythonista and other similar apps will show a new kind of “scripting” and task automation built around the core strenghts of iOS. As we’ve seen, x-callback-url is a standard that leverages a part of iOS – URL schemes – to achieve simple, user-friendly and URL-based inter-app communication that can be used in a variety of ways. Looking ahead, there’s a chance rumored features such as XPC will bring more Mac-like functionalities to iOS, but developers will still find new ways to make iOS more powerful without giving up on positive aspects such as increased security and the simplicity of the app model.

Mr. Reader – a Google Reader client that I’ve covered on MacStories in the past, and my favorite RSS app – has today been updated to version 1.11, which introduces a generic solution for launching URL schemes that shows how iOS automation is a growing trend, albeit substantially different from what we’re used to see on OS X.

Right now, there’s no Apple-sanctioned way to build automated workflows on iOS. In this regard, you’d be disappointed to find that Mr. Reader still requires you to know URL schemes and have a basic understanding of what is going on with a URL that will launch another app. However, the way Mr. Reader implemented this feature is, by far, the best one I’ve seen on iOS to date.

Mr. Reader’s developer, Oliver Fürniß, supported a lot of apps in previous versions of his Google Reader client. Since the very first updates, Mr. Reader became well known for allowing users to open an article’s link in an alternative browser, or sending a URL to OmniFocus to create a new task. All these actions, which spanned browsers, to-do managers, note-taking apps, and more, were hard-coded by Oliver. It means he had to manually insert them in the code of the app, without offering his users the possibility to customize them or create new ones entirely. Mr. Reader was versatile, but as URL schemes started becoming more popular, there was always going to be an app that wasn’t supported, which required Oliver to go back and hard-code it again into the app. Oliver tells me he received “hundreds of requests” to add support for a specific app that had been updated with a URL scheme capable of receiving URLs or text. It was getting out of hand.

The new generic solution allows you to build as many actions as you want, using the parameters you want, using either URL schemes from sample actions or by entering your own. In terms of iOS automation, this is the DIY version of Services: actions will appear in standard menus, but they will launch an app – they won’t display a part of an app inline (as Clark envisioned in 2010).

The Services menu in Mr. Reader has been updated to reflect the new “generic” URL scheme functionalities. As with the previous version, there’s a variety of native sharing options and third-party services that Mr. Reader supports, such as Buffer, Evernote, or iMessage. These work in the same way as they did before. What’s new is the “Add” section at the bottom: here, you can choose to build a service for a browser (such as Chrome or iCab), a “mail action”, or other apps. They all share the same underlying concept, but the implementations are slightly different.

Essentially, Mr. Reader uses a series of placeholders to simplify the process of inserting data in the URL scheme. These placeholders will change every time depending on the article you’re reading, the source, or the kind of link you want to share. Think of them as variables.

{...} – The content between the curly brackets is URL encoded.

[SOURCE] – A feed’s name.

[TITLE] – An article’s title.

[TEXT] – An article’s content.

[TEXT-SELECTED] – Your text selection within an article.

[URL] – An article’s URL.

[URL-WITHOUT-PROTOCOL] – An article’s URL without “http://”.

[URL-SHORTENED] – An article’s URL shortened with your default service.

With these variables, and by keeping in mind a few tips, users can constructs actions that pass along data to other apps capable of accepting it.[1]

DIY Services

For instance, Google Chrome for iOS has a URL scheme for receiving links and opening them in tabs. This is what apps like The Magazine rely on to let you open links in Chrome instead of Safari. With the new Mr. Reader, you can build an action that opens a link from an article straight into Chrome; in fact, the app comes with 10 pre-installed actions for browsers, including one for Chrome. Here’s how simple it is to build the action using the variables:

googlechrome://[URL-WITHOUT-PROTOCOL]

Do you prefer iCab, but you want one for HTTPS links? Mr. Reader has one, and it also comes with dedicated fields for HTTP and HTTPS.

icabmobiles://[URL-WITHOUT-PROTOCOL]

Once you’ve learned the basic idea behind the default variables (or “tags”, as Mr. Reader calls them), you can build any action you want, for any app. Head over the Other App section, and take a look at the examples provided by the developer. Among others, there’s a default action for Agile Tortoise’s Drafts, which will send an article’s title, URL, and selected text (if any) directly to Drafts.

There are a couple of things worth noting about the screenshot above. First, notice how liberal Mr. Reader is about letting you enter new lines within a URL scheme. In any other app, such a formatting would break the URL scheme entirely. Mr. Reader’s implementation is clever in that the curly brackets act as encoders: Drafts wants URL-encoded strings [2], so Mr. Reader’s curly brackets will encode everything that’s inside them – including blank lines. This makes it extremely easy to build actions that will send text with special characters, or, as in the case above, line breaks for easier reading and formatting.

As you can see in the same screenshot, there’s also a “Visibility” field for the action. Mr. Reader lets you selectively choose to show actions in the standard menu, the link menu, and the text selection menu. The latter is my favorite, as it puts my own actions into the standard iOS copy & paste menu that appears when you select some text in an article.

Sample Actions

I made three sample actions to show the potential of Mr. Reader’s services.

I covered Poster 2.0 a few days ago. Let’s say that I want to create a quick linked post for an article I found in my RSS feeds. I want to use the article’s title as my post title too, and I want the article to contain the source URL and text I have selected. Normally, I would need to switch back and forth between apps and copy & paste a bunch of times to get it right. With Mr. Reader, it’s just one tap.

Note how, thanks to Poster’s new support for callbacks, I can send text to it, then go back to Mr. Reader automatically, as if nothing happened.

The second action is a simple one: there’s a sentence from a blog post I want to tweet with Tweetbot. Using Tweetbot’s URL scheme, I can send some text to my account to compose a new tweet, and then the app will go back to Mr. Reader for me. Note how the curly brackets allow me to put quotes and new lines inside them.

Curly brackets don’t care.

Last, Pinbook. I want to create a new bookmark and use the text I have selected as the Pinboard description for the item. Done.

Don’t forget about Mail actions. Some services like Evernote or OmniFocus Mail Drop let you forward text to your account using specific tags/characters in the subject line. So let’s say you want to forward a Mr. Reader article to your Mail Drop: should you type the address manually and copy & paste text every time? No, you shouldn’t.

You can just build a new Mail action that will bring up a native Mail window with all the fields you want already filled in for you.

More iOS Automation

Today’s Mr. Reader update is a fantastic addition for users who understand URL schemes and have been looking for ways to send text and links to other apps. I have only shown three simple examples, but you can imagine the potential.[3]

However, this is also another reminder that iOS users need a better way to let apps communicate with each other. This is something I’ve discussed in my interview with John Siracusa, and I’ll say it again: Apple can’t expect users to learn URL schemes if they want the slightest amount of automation on their devices. Sending text from a news reader to a blogging app is not a complicated idea, and yet it can be ridiculously complex to do it on iOS. Hopefully iOS 7 will provide a better experience to let apps work with each other.

Still, right now, Oliver Fürniß has come up with a great implementation to send URLs and links to other apps using URL schemes. I’m looking forward to making more actions for Mr. Reader.

Update: Here are the links to download the actions, including a new one I made to send text to Day One.

To install the actions, you can use something like Documents to download them, then select one and choose “Open In Mr. Reader”. Or, email them to yourself and do the same from Mail.

Poster: URL + selection

Tweetbot: tweet selection and URL

Pinbook: bookmark with description

Day One: new entry from selected text in Markdown

Notesy: append to “Scratchpad.txt” file

Update 18/1: I added a Notesy action to the list of actions above. Based on Notesy’s URL scheme (detailed here), you can modify the action to use a different creation method (don’t want to append? You can create new text files) with different parameters for x-callback-url.

The video below shows my workflow, which takes the current selection and appends Title + selection + URL to an existing file in Notesy.

I also made a video showing the Day One action, which creates a new entry formatted in Markdown using a post’s title, selection, feed name, and URL.

To type these tags, Mr. Reader comes with an additional keyboard row that makes it easy to tap one and quickly insert it. ↩

If you’re coming from Launch Center Pro and you’re wondering why you don’t know anything about this, it’s because Launch Center Pro takes care of encoding everything for you before launching other apps. ↩

How about sending text and URLs to a specific Pythonista script and doing whatever you want with them? ↩