WWDC 2014 Recap – Making users and developers happy – Part 2
After describing the benefits of the upcoming changes regarding iCloud in my previous post about WWDC 2014 (I know - I’m late) I’m now talking about some more technical stuff. So let’s talk about Extensions and Frameworks.
Extensions
This will be the most user-visible enhancement of iOS 8 (and Mavericks). You know Apple and their restrictive handling of inter-app communication? Some people think it’s a curse, that apps aren’t allowed to communicate directly with each other or that app A can’t access the content of app B directly. Well - I think it’s a good security implementation. I like sandboxing btw.
So what’s this Extension stuff now? Apple is introducing new capabilities so that developers are able to provide new functionality “outside” of their own app. There are different kinds of Extensions available.
- Today extensions let you add new functionality to the Today view. It’s a bit like Android’s widgets or Live Tiles on Windows Phone.
- Action extensions allow you to view or edit content of another app. Like manipulating the DOM of the current Safari window or offering in-app translation for an app.
- Share extensions can be used to post files, links or photos to an online service. If you’re running an online cloud storage you can now enable a direct writing access for any other app.
- Storage Provider extensions provide the capability to open documents from file/cloud services. Think of it like a “File Open” of a file explorer.
- Custom keyboard extensions replace the default Apple software keyboard with a new third-party one. I know some people who’ll love it (btw: the new keyboard in iOS 8 is also very cool).
- Photo Editing extensions bring the capability to edit photos within the Photos app. A possible use case would be to bring photo-editing or photo-filtering capabilities. The editing will be non-destructive - you’ll have the original and the edited photo.
I’m really looking forward how the new capabilities will be leveraged by app developers. There are hundreds of use cases how to make users life easier and more convenient.
One last thing: Extensions can’t be installed separately. They need to be part of an app. So they have a defined deployment way - and a kind of control through Apple.
Frameworks
One would say “Frameworks are a developers thing”. Yes - they are. But their implementation into iOS offers new possibilities for developers. Which will be realized into new functionality for users.
A framework is a collection of re-usable software components. No, not really. If you’re a developer you’ll know what it is. So what’s new here?
New is that frameworks have been introduced to iOS. They have been available for OS X development for a while, but never on mobile. For iOS you had to work with static linked libraries (which serve kind of same functionality). The caveat with linked libraries is that the class name had to be unique across the whole application. So if you have a class called “Tools.h” you have to hope that nobody else, i. e. a 3rd party library, is using a “Tools.h” class. That has been solved using custom prefixes for classes like “MPDSTools.h”. But…that may be error prone to.
Frameworks solve that problem. Xcode is now aware of the source of each class so that you may have different classes with the same name in you app.
In addition frameworks are the way to share code across an app. If you want to provide functionality for your app and for your Extensions (see above) you have to share it via a framework. That’ll minimize some amount of programming work.
By the way: as frameworks are available on iOS and OS X now it’ll be easier to port functionality from one platform to the other.