GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • iMore
  • US
  • RSS
  • iPhone
  • Macs
  • MacBook
  • MacBook Air
  • MacBook Pro
  • Mac Mini
  • iMac
  • macOs
  • iPad
  • iPad Air
  • iPad Mini

This view

  • Original page
  • New address

GeezerVison is showing www.imore.com — Action extensions in iOS 8: Explained

This content was produced prior to the launch of iMore Labs. Find out more about Labs.
  • Facebook
  • X
  • Email
Share this article
Join the conversation
Follow us
Add us as a preferred source on Google
Subscribe to our newsletter

Share Sheets in iOS have another name behind the scenes — activity view controllers. That's fitting because, in addition to providing sharing options, they also provide for other "activities", like action options. Traditionally, that's been system options such as copy, save, print, etc. However, just like custom sharing options have now been made available in iOS 8, so too have custom action options. They're part of the new Extensibility feature set, one of the most important additions to iOS since the advent of the App Store. Extensibility enables Widgets, custom keyboards, and so much more, including custom action extensions. So, how do action extensions work?

Action packed

Action options first came to iOS as part of the same drab lists that contained share options. Not only did that fail to provide a lot of visual distinction, it didn't scale.

When share options moved to the grid-like Share Sheets in iOS 6, actions joined them. There, share options got the full color icons of the apps with which they were associated, and action options got custom, grayscale icons that indicated their function — save to Camera Roll, print to AirPrint, copy to clipboard, etc. Share and action options still ran together, however, and the grid scaled only slightly better than the list.

With iOS 7, Share Sheets got a new look and feel to match Apple's new design language, and actions switched from being grayscale to black and white. Moreover, actions got their own distinct row along with horizontal scrolling to fit in as many as needed. However, there were still only a very few action options, and only the ones that matched services Apple provided.

iOS 8 changes that.

How action extensions work

Extensibility in iOS 8 means that we're not longer bound to action options supported by Apple and Apple alone. We no longer have to wait for things like AirPlay and AirPrint to be rolled out, or wonder if Apple will ever add system-wide support for someone else's product or service. Now any app can add an action extension that increases the utility and diversity of other apps and iOS itself.

So, instead of Apple and Microsoft making a deal to get Bing translate built into Safari, Microsoft can simple make an action extension to the Bing app and, thanks to Extensibility, it'll be available just like the built in options.

Getting to an action extension is simple. If you're in Safari and you're reading iMore, and your native language isn't English but French, you can tap the Share button, scroll horizontally to the Bing Translate extension, and voila, the page would translate-in-place for you.

To help keep things manageable, action extensions tell iOS their context — whether they work on text or images, form fields or something else — and iOS will only present that work in that context. So, if you select text, you won't get image action options.

You can also arrange action extensions in any order you like. Scroll to the end of the action options on the Share Sheet, tap the More button, and slide any item in the list up or down. Unlike custom share options, however, you can't toggle any of the default system actions off, but you can toggle the custom ones

Still, that means if you use the 1Password action extension to autofill your passwords all the time, you can put it into one of the first few slots. Then it's always immediately available, no scrolling required, whenever you tap the Share button.

Like plugins, action extensions don't just add more apps, they add more functionality to the system and existing apps. Say goodbye to having to leave Safari, go to 1Password, use the in-app browser, or copy the password to the clipboard and find your way back to Safari. With iOS 8, Extensibility, and action extensions, everything just works, right where you need it, right when you need it.

Custom Safari actions

There's also a special kind of action extension in iOS specifically for Safari. They're called custom Safari actions and they come in two types:

  • Action extensions that present it's own interface
  • Action extensions that presents no interface.

An example of an action extension that presents its own interface would be 1Password, which could ask you which of your 3 different Google accounts you want to use to login to YouTube.com.

An example of an action extension that currently doesn't present an interface would be Bing Translate, which, as demoed at WWDC, instantly replaces the existing text on a webpage with translated text.

Developing action extensions

Activity extensions let developers wrap up a piece of functionality from their app and make it available to iOS and other apps via the built-in Share Sheets.

Although extensions are primarily view controller based on iOS, as mentioned above, activity extensions can be view controller based, or for custom Safari extensions, they can have no view.

The difference between standard action extensions and custom Safari extensions is that only custom Safari extensions can use JavaScript integration. They get full access to the Document Object Model (DOM) and that means they can, for example, grab an image from a web page, mark it up, and then put the updated version back in place of the original.

Like with share extensions, activity extensions have activation rules to tell the system what kinds of data they can manipulate. That way, for example, if a paragraph is selected, only custom actions that can manipulate text are displayed among the options. If a picture is selected, only custom actions that can manipulate images are displayed.

Apple has several resources to help developers with action extensions:

  • WWDC 2014 Creating Extensions for iOS and OS X session, Part 2
  • Apple (pre-release) Extensibility documentation

Action extensions and security

iOS is a security- and privacy-first operating system. Adding functionality like action extensions is one thing. Adding them while maintaining a high level of security is quite another. With iOS, apps are "sandboxed" so they can only access their own data unless specific, explicit permission is given by the person using them. That's why apps need to request access to the camera roll, or why you have to tap the "Open in..." button. It makes it harder for malicious apps to do ever get onto the system and into your private data.

With iOS 8 and Extensibility, Apple keeps an app's extensions inside the app's sandbox, but allows iOS, and other apps by way of iOS, to reach out, request interface, information, and functionality. The container app can then project that interface, information, and functionality back to iOS or the host app right back.

For action extensions, the app you're sharing from is the host and the service you're sharing to is the container. For example, if you're in Safari, that the host application. If you're using an action like filling a password from 1Password or translating text from Bing, those would be the containers. Beyond security, that provides reliability — neither 1Password nor Bing in those examples would have to be running in advance, or persisting in the background, for the action extensions to be invoked.

When an action extension is called, it communicates securely through iOS to its host app for things like the authentication and password information or the translation libraries. That's then sent back to the container app so the action can complete.

Apple hasn't detailed the specifics of how all this works yet, but has said it uses similar security to the rest of iOS. Since iOS 7, Apple has done an incredible job with security and cryptography. I'm willing to bet Extensibility is enjoying something just as well thought out and just as secure.

Bottom line

Activity extensions provide incredible new functionality to iOS 8 and to iOS 8 apps. It's important to remember that this is Extensibility 1.0, and just like multitasking has, Extensibility will no doubt evolve over time. For example, it looks like 1Password can currently only fill passwords in Safari, not in web views or native interfaces in other apps.

Regardless, activity extensions mean iPhone and iPad owners will get to spend less time jumping between apps and more time getting things done within the apps they're already using. And that's a huge win.

Any apps you're especially interested in getting action extensions for come iOS 8 launch?

  • More of iOS 8: Explained

More of iOS 8: Explained

  • Handoff in iOS 8 and OS X Yosemite: Explained
  • Making and receiving phone calls on iOS 8 for iPad and OS X Yosemite: Explained
  • Sending and receiving SMS/MMS on iOS 8 for iPad and OS X Yosemite: Explained
  • AirDrop and Instant Hotspot in iOS 8 and OS X Yosemite: Explained
  • QuickType keyboard in iOS 8: Explained
  • Interactive notifications in iOS 8: Explained
  • SceneKit in iOS 8: Explained
  • Metal in iOS 8: Explained
  • Widgets in iOS 8: Explained
  • Share extensions in iOS 8: Explained
  • Action extensions in iOS 8: Explained
  • Inter-app photo and video editing in iOS 8: Explained
  • Custom keyboards in iOS 8: Explained
  • Family Sharing on iOS 8: Explained
  • iCloud Drive and Document Picker for iOS 8: Explained
  • Document provider extensions in iOS 8: Explained
  • TestFlight in iOS 8: Explained
  • Apple Maps in iOS 8: Explained
  • iMessage in iOS 8: Explained
  • Photos in iOS 8: Explained
  • Spotlight in iOS 8: Explained
  • Health in iOS 8: Explained
  • Touch ID in iOS 8: Explained
  • HomeKit in iOS 8: Explained
  • Adaptive UI in iOS 8: Explained
  • Manual camera controls in iOS 8: Explained
Rene Ritchie
Rene Ritchie
Contributor

Rene Ritchie is one of the most respected Apple analysts in the business, reaching a combined audience of over 40 million readers a month. His YouTube channel, Vector, has over 90 thousand subscribers and 14 million views and his podcasts, including Debug, have been downloaded over 20 million times. He also regularly co-hosts MacBreak Weekly for the TWiT network and co-hosted CES Live! and Talk Mobile. Based in Montreal, Rene is a former director of product marketing, web developer, and graphic designer. He's authored several books and appeared on numerous television and radio segments to discuss Apple and the technology industry. When not working, he likes to cook, grapple, and spend time with his friends and family.

Latest in iOS 8
iOS 8
iOS 8 Decade in review: 2014 is the year Apple made us think differently about our health
 
 
iOS 8 iOS 8.4.1 brings better accessibility to Apple Music
 
 
iOS 8 iBooks gets audiobooks, iBooks Author content for iPhone in iOS 8.4
 
 
iOS 8 How to fix iOS 8 Unicode Messages crash bug
 
 
iOS 8 Apple seeds iOS 8.4 beta to developers, includes revamped Music app
 
 
iOS 8 Touch ID not working for you post iOS 8.3? Here's the fix!
 
 
Latest in News
iMore Logo
Apple One more thing… Goodbye from iMore
 
 
Jony Ive
iPhone Jony Ive’s OpenAI hardware device could be his next world-changing design
 
 
NEBULA Cosmos 4K SE with Apple TV
Accessories This new 4K projector is tempting me to replace my LG C2 TV
 
 
VisionOS 2 app reorganization
Vision Pro visionOS 2 is the first major software update for Apple Vision Pro, and now it's available
 
 
macOS Sequoia
Macs macOS Sequoia (version 15) is now available for your Mac with some big upgrades
 
 
watchOS 11
Apple Watch watchOS 11 is now rolling out to all Apple Watch users with the Series 6 or newer
 
 
LATEST ARTICLES
  1. Time to power down for good.
    1
    One more thing… Goodbye from iMore
  2. 2
    Tapo TC73 pan/tilt AI camera is a vision of perfection
  3. 3
    Aqara Smart Video Doorbell G4 review: fast notifications, needs more height
  4. 4
    iFi GO blu review: The best Bluetooth mobile DAC right now
  5. 5
    Jony Ive’s OpenAI hardware device could be his next world-changing design
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.