Friday 22 May 2015

Extension and Widgets in iOS 8

               
A lot has been said about the multiple features in iOS 8, but what among them all is the most powerful? This is a question that must be asked. Any seasoned developer will tell you that it is the feature of extensions that provide different ways to share data and functionality of your app with other iOS apps that is the most powerful.

Every extension deals with one specific part of the system. This article looks at extensions in iOS, in particular at Widgets, also known as the today extension that appears in the Today view in the notification center.

What are Extensions

Extensions allow you to share custom functionality from your app to other iOS devices. The areas in the operating system that support extensions are known as Extension points. There are 7 extension points in iOS overall:

1) Today extension – See quick updates in the Today view.

2) Action – Edit or view content provided by a host app.

3) Share – Share content with others or post it to a website.

4) Document Provider (iOS) – Access and edit a repository of files.

5 )Photo Editing (iOS) – Edit a photo or video using the stock Photos app.

6) Custom Keyboard (iOS) – Provide a customized system keyboard.

7) Finder Sync (OS X) – Show information about file sync state within Finder.

Inside Xcode, each extension template is tailored for exactly one of the extension points listed above. There is no concept of a “generic” extension that will work with more than one extension point.

Every extension exists inside a container app as a separate binary. They are added to an existing project as a new target. This means you don’t release extensions individually. Instead, they are released alongside their container app. One app can contain several different extensions. Let us now look at Widget extensions.

Widget extension considerations

Before we know more about Widget extensions, you need to know that Widget responsive, sharp and need to provide quick information. Widgets should not include processes such as signing in, browsing extensive data etc. In essence, extensions should not be step-intensive.

For those of you wondering about the code it takes to build a Widget, you actually don't need to do much once you get the drift of NCWidgetProviding.



No comments:

Post a Comment