iOS 8, Email, and Extensions

One of my biggest frustrations with iOS 8 so far is the lack of extension support in Apple’s Mail app. As I wrote in iOS 8 Changed How I Work on My iPhone and iPad:

I’m disappointed to see a lack of extension support in Apple’s own apps, and particurlarly in Mail. It just makes sense, in my opinion, to be able to turn messages into tasks or archived documents, but Apple hasn’t integrated extensions with Mail yet.

My feelings haven’t changed since September and, in fact, Mail’s non-existent sharing capabilities have been exacerbated by my move towards a more iPad-centric workflow after upgrading to an iPad Air 2. I’ve been working from my iPad Air 2 on a daily basis for the past two weeks, and the friction in Apple’s Mail app has led me to use other email clients simply because they came up with their own implementation of action and share extensions for email messages.

Apple Mail

For iOS 8 (and iOS 8.1, and, as far as I can tell, the upcoming iOS 8.1.1), Apple has decided to avoid enabling support for action and share extensions for message content in Mail. This means that you can’t feed message text or any other parameter from an email message (sender information, flagged status, date, etc.) to an extension because there isn’t an extension point (share sheet) to begin with. Mail messages in iOS 8 are completely isolated from extensions.

Since writing about this in September and covering the topic on Connected, I received various responses from readers and listeners who claim that share sheets haven’t been implemented in Mail for security concerns in enterprise scenarios. Large companies, the argument goes, don’t want iPhones and iPads deployed to employees to be potentially capable of sharing private information directly from Mail.

While there may be a security aspect to Apple’s decision, I tend to believe that the explanation is much simpler – time constraints. Given the limitations and problems of Apple’s initial extension framework, I find it more likely that the company couldn’t build a proper integration of Mail messages and extensions in time for the public release of iOS 8, as such integration (if done well) would imply a broader set of parameters and conditions than, say, sharing an individual file from Photos or a URL from Safari. It may as well be that Apple wants to launch a brand new set of extensions specifically designed for Mail eventually (think widgets and custom keyboards), and we don’t know that yet. But, in my mind, the security argument seems weak.1

Quick Look in Mail

That Apple Mail doesn’t support extensions isn’t completely true either, and proof lies in one of the most obvious iOS features – Quick Look previews. While you can’t pass message information to extensions, any attachment that can be previewed with Quick Look (tap & hold the file > Quick Look) can be fed to Apple’s share sheet, which will allow you to save the attachment elsewhere on iOS through action and share extensions.

Slack, Evernote, and PhotInfo extensions in Apple Mail

I’ve been saving attachments from Mail to a variety of third-party apps with inconsistent results that, once again, suggest that the technology isn’t fully in place yet. From Quick Look previews, I saved images to Evernote, posted them to Slack and GroupMe, and uploaded them to my server with Transmit using the extensions provided by these apps, and results were admirable on iOS 8.1. There’s a certain magic to being able to upload an image over WebDAV using Transmit from Mail, and the same applies to any other social/communication tool that has a share extension.

When I tried to send an image from Mail’s Quick Look to Wunderlist (which has an extension and supports attachments for tasks), however, I was presented with a scary URL that showed the path of the attachment on my local system as the task’s name:

I don’t know if the culprit is Wunderlist and whether their developers should know better, but the extension works from Apple’s Photos app, which correctly attaches an image to a task as a file. The fact that extensions that don’t support files (such as Drafts) show up in the Quick Look menu for Mail suggests that the share sheet itself may need a better way to include/exclude extensions depending on the information that’s being passed to them.

I discovered further inconsistency in passing email attachments to extensions without going through Quick Look first. Tap & hold an attachment such as a PDF or a JPEG, and you’ll get a share sheet that shows available extensions and a Quick Look button; don’t choose the Quick Look option, but instead go directly to an extension such as Evernote. In my tests, Evernote couldn’t attach a file through the extension from the share sheet, but it could if the share sheet was activated from the Quick Look window. Confusing, I know.

When it works, it’s nice that I can move email attachments around without leaving Mail. Apple’s Mail app has a bigger problem, though, and that’s the lack of a basic system to activate extensions for entire messages. Workflows such as printing to PDF or turning a message into a task (which are possible on OS X either through AppleScript or native menus) are completely missing on iOS, which is disappointing given the new extensibility features of the OS.

Dispatch

Thankfully, the developers of Dispatch have seen the potential for share sheets in iOS email and they’ve updated the app to include native extensions.

Clean Shaven Apps understood last year that an actionable email client for iOS was needed for those who want to do serious email processing on an iPhone. With the first version of Dispatch, they built a custom action menu that allowed you to turn email messages in reminders, calendar events, and more; over the past year, they’ve been iterating on their custom implementation, bringing deeper integration with iOS apps and web services such as Evernote and Todoist.

With version 2.2, released last month, Dispatch gained the ability to show the native share sheet for email messages as an option in the app’s own share sheet. Like Reeder and Unread, native extensions sit alongside custom integrations: to show the share sheet, you have to tap on “Others” in the app’s custom sharing panel.

Like share sheets for files in Apple Mail, extensions in Dispatch mostly work for email messages, with some limitations that, I believe, stem from flaws in the current extension framework and varying implementations from third-party devs.

Dispatch can send a message’s subject, selected text, and unique URL to any action or share extension that accepts text. In my tests, I was able to send these parameters to create a new note in Drafts, turn messages into tasks with the Fantastical and Wunderlist extensions, save them to Evernote, and even share quotes from messages using Linky. And thanks to individual message URLs, messages saved from Dispatch can be easily re-opened from other apps using Mail or Dispatch URLs – another detail that’s (almost) completely ignored by Apple.2

As you can imagine, there are a few inconsistencies with the way native extensions process email messages in Dispatch. Sometimes, message URLs are parsed as task titles instead of notes (Wunderlist); messages can show up as attached plain text files in some share extensions (Evernote); other times, selected text isn’t passed to an extension at all.

On the whole, this first take on share sheets for email messages is solid, and, while I’d like the developers to consider an option to make native extensions the default share sheet in Dispatch, I understand why they want to have both custom and native extensions right now (which is exactly what they predicted they’d have to do back in June).

CloudMagic

I should also mention that Apple Mail doesn’t support attaching files from external locations other than Photos in spite of iOS 8 offering a system to pick files from any app. Fortunately, there’s a third-party take on this problem as well.

CloudMagic is a cloud-based email client (read: messages have to go through their servers, like Mailbox) that offers push notifications, fast search, a polished iOS interface, and custom sharing actions called Cards. For iOS 8, CloudMagic added the ability to attach files from storage providers or save received attachments to other apps with extensions or storage providers.

The CloudMagic implementation is basic, but it works. When you tap on the attachment icon in the Subject field, you get a popover to choose from various storage provider extensions; I’ve been picking files from Documents 5 and Transmit in this way, and it works as advertised. It’s too bad that extensions from Quip, Google Drive, and Dropbox don’t support picking files, but the other apps I tried worked perfectly (Transmit was especially impressive as it can turn files from remote servers into email attachments – crazy).

Saving an attachment to Google Drive from CloudMagic

Saving attachments outside of CloudMagic works, too. Like Apple Mail, you can show the share sheet for selected attachments, but CloudMagic also lets you directly save files with storage provider extensions using a “Save to” feature. You can guess that being able to save attachments to Dropbox or Google Drive directly from your email app could be a good idea, and I can’t refute that guess. It’s a great feature and CloudMagic gets it right.

Extending Email

I don’t know why Apple hasn’t enabled extensions in Mail for iOS 8. If time constraints are to blame, hopefully Dispatch and CloudMagic are proving that the ability to act on messages and integrating with storage providers is a much needed step for processing email on iOS devices, and Apple should take note.

I love the elegant interface of Mail and its new gestures for triaging messages, but the same limitations of six years ago still largely apply. For Mail to be truly desktop-class, Apple needs to build support for the latest iOS extensibility features, and I’m looking forward to updates next year.

Plus, it’s not like Apple couldn’t build a new set of restrictions to prevent corporate customers from using extensions in Mail, letting everybody else enjoy the benefits of extensions. ↩︎

Apple does, in fact, attach a unique Mail URL when saving a date from an email message as an event in the Calendar app. This allows you to quickly reopen the referenced message from Calendar in Mail, and it’s limited to data detectors for dates and time. ↩︎