This Week's Sponsor:

Textastic

The Powerful Code Editor for iPad and iPhone — Now Free to Try


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


PaintCode: Vector Drawing to Code

header-image

header-image

If you are active in the Apple developer community, you are probably already familiar with PaintCode. It is a unique Mac app capable of turning your vector graphic design into pure Objective-C code. PaintCode is a professional quality app and the price tag is a reflection of that fact. The normal selling price of $99.99 (currently $19.99 via MacHeist) is a big pill to swallow for the average user but for a professional iOS/OS X developer it is merely a business investment. However, it is up to you to get your money’s worth out of the app.

PaintCode is full of tools that blend together the look and feel of traditional vector drawing apps while including customizable fields you would more commonly see in Apple’s Interface Builder. It supports numerous object shapes and custom bezier paths, as well as detailed color options including linear and radial gradients. The app is versatile and the uses are limited only by your imagination.

I thought the best way to give you an overview of PaintCode would be to come up with a sample project that I could walk you through. So I decided to make a menubar icon for a non-existent app. This app lets you drag files to the menubar icon to delete them, thus the icon needs to be a little trash can. Read more


A Software World

Great article by Robert McGinley Myers on cynicism in the tech press. I agree with every word of it.

Software is the magic that makes our devices “indistinguishable from magic”. Many of us think of it as an art form, and yet it’s a strange sort of art form. Most art forms don’t remind you to take out the recycling or help you lose fifty pounds. But the things software can do are almost limitless. Maybe tech journalists would be less cynical about the advances of technology if they wrote more about software than hardware, and more about the how than the what — how software is not only changing its shape, but changing our shape, in more ways than one. That is the real, ongoing technological revolution.

Permalink

My iOS Screenshot Generation Workflow

Screenshots

Screenshots

I didn’t think that complaining about iOS status bars on The Prompt would result in Dr. Drang going on a vision quest to produce better screenshots with Python. But I’m glad that I took the time to point out my dislike for messy status bars, because it led the good Doctor to work on some great scripts to automate the entire process with Python, which are compatible with Pythonista for iOS.

I waited to share my workflow for automated screenshot cleaning/generation because I wanted to see where Dr. Drang would end up with his script, Cleanbar. Now that he appears to have settled on a solution that requires standalone image files to act as partial status bar replacements, I think it’s the right time for me to share how I produce iPhone and iPad screenshots for MacStories.

The first step is to set up Cleanbar. I don’t need to repeat what Dr. Drang already explained, but to sum up: grab a black status bar, crop it to get two files similar to Drang’s, then run a script to pack those images as strings. Once set up, you’ll be able to a) use Cleanbar to clean single images picked from the Camera Roll with Pythonista and b) integrate it as cleanbar in other scripts to clean status bars programmatically.

As for my needs:

  • I usually need to combine two iPhone screenshots side-by-side in a single image as you can see in most reviews on this site;
  • I may or may not need to clean their status bars;
  • I don’t have to combine iPad screenshots. I only need to resize them and I may or may not have to clean their status bars;
  • Occasionally, I want to produce a banner with three screenshots (like this one), which can have original or cleaned status bars;
  • Sometimes, I only need to clean one screenshot out of two;
  • I always need to upload the final image to a Dropbox folder, which is monitored by Hazel.

And, because I’m not an animal, I wanted to automate all of this. The scripts that you’ll find below are the result of late night tweaking and lots of tests; they probably aren’t the most elegant or “Pythonic” way to handle this kind of image generation, but they work for me and they make me save several minutes every day. I haven’t been generating review screenshots manually in months, and they’re more flexible than my old workflow based on Keyboard Maestro.

Read more


Simbol for iPhone

Simbol

Simbol

Developed by Amit Jain, Simbol is an iPhone utility to view symbols and special Unicode characters. If you ever play with URL schemes on iOS, you know how tedious it is to convert special characters to HTML codes: Simbol comes with this feature built-in, allowing you to tap on each symbol to copy its HTML or entity code (of course, you can also copy the symbols themselves).

The main screen of the app shows a list of symbols organized in categories; in this first version, categories include Special Symbols, Math Symbols, and Reserved Characters, among others. There is a search bar at the top to look for a specific character by name and you can tap & hold on each symbol to add it to a temporary holding tray for equations. Personally, I just find it handy to be able to quickly search for something like “greater than” and copy its HTML code without having to Google for it.

If I had to nitpick, I’d say that it would be nice to have Favorites, a way to launch searches from Launch Center Pro, and the possibility to hide characters in the main screen, showing only category names. Much like Apple did with albums in the Music app, you can’t view a simple list of categories because symbols will always be shown inline, which makes it hard to scroll the app’s main list if you only want to open a specific category.

Simbol is a good idea, does one thing well, and it’ll save me the time I’d spend looking for HTML codes on Google. It’s free on the App Store.


Brett Terpstra’s New Adventures

Brett Terpstra is now an independent developer and writer:

Monday will be the start of increased focus on existing projects and attention to new ideas that have been bubbling up. I’ll be writing, including finishing my tagging book and working on the children’s book. I’ll be developing Marked (starting with the App Store version) and adding a couple of smaller apps to the App Store list. I’ll continue blogging, which brings me to a final request.

If you’ve ever played with OS X automation workflows, Automator, scripts, or TextExpander snippets, it’s likely that you used one of Brett’s tools. Brett is the developer behind Marked 2 (one of my must-have Mac apps) and I’m excited to see what he’ll do next.

Permalink

Apple Airs New “Your Verse” iPad Air Commercial

Your Verse

Your Verse

Apple has today aired a new iPad Air commercial called “Your Verse Anthem” focused on the capabilities of the iPad as a device to express the creativity of the human race. The ad features voiceover by Robin Williams taken from the movie Dead Poets Society; in the clip that Apple chose, John Keating (Robin Williams) describes why people read and write poetry and how everyone can contribute a verse to the world. Interestingly, as noted by Linus Edwards, this isn’t the first time Apple has been inspired by Dead Poets Society. 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:


Yahoo News Digest

As someone who both enjoys long form content and sharing what I think others might enjoy, it’s easy to write off Yahoo News Digest as something that feels indifferent. Unlike the Evening Edition, which features important world news summarized by real people, Yahoo boasts its mobile digest as a product of algorithms, whose editors bring together the day’s hot topics into smart summaries from multiple sources. It’s considered to be the result of Yahoo’s $30 million acquisition of Summly, with founder Nick D’Aloisio taking charge behind the company’s initiative into the “news for everyone” space.

It’s not a new endeavor, however, if you consider previous forays like Livestand, which brought news and weather together in a magazine-like format on the iPad. Then there’s Yahoo’s self titled app, which later integrated Summly to create an endless stream of news, entertainment, sports, and lifestyle content. Even Yahoo’s homepage is a landing page for those subscribed to Internet service providers like AT&T, delivering trending topics, stories, local weather, and stocks to anyone who wants to log into their provider’s email accounts. This is unlike Google, whose homepage is barren sans occasional promotions and informational snippets. Needless to say, Yahoo has been dishing out news for a long time.

Yahoo News Digest is their attempt to modernize the thirty minute local or national news segment, re-imagining it for mobile as series of articles covering current events from around the world. Digested down to eighteen articles, nine for the morning and nine for the evening editions, Yahoo shares what they consider to be the most relevant articles of the day, rounding out the day’s news under traditional topics such as US News, World News, Entertainment, Sports, etc. It’s a news service built for the masses.

So… Is it any good?

Read more