Pages: [1]   Go Down
  Print  
Author Topic: Widgets in iOS 8: Explained  (Read 643 times)
HCK
Global Moderator
Hero Member
*****
Posts: 79425



« on: June 30, 2014, 09:00:32 pm »

Widgets in iOS 8: Explained

<div class="field field-name-body field-type-text-with-summary field-label-hidden"><div class="field-items"><div class="field-item even" property="content:encoded"><p><a href='http://www.imore.com/widgets-ios-8-explained' title="Widgets in iOS 8: Explained"><img src='http://www.imore.com/sites/imore.com/files/styles/large/public/field/image/2014/06/wwdc_2014_widgets.jpeg?itok=xD3KR8vl' />[/url]</p> <p>Extensibility is one of the biggest new features in <a href="http://www.imore.com/ios-8" title="iOS 8 help, how-to, reviews, and news">iOS 8[/url] — and <a href="http://www.imore.com/os-x-yosemite" title="OS X 10.10 Yosemite help, how-to, reviews, and news">OS X Yosemite[/url] —because it's also one of the most important, most enabling new technologies to come to Apple's mobile platform since the launch of the App Store. With Extensibility, developers can project their app's interface and functionality into everything from Notification Center and Share Sheets to DocumentPicker, custom keyboards, and other apps. What's more, they can do so securely, using the phenomenal encryption built right into iOS. The Notification Center part is all about widgets in the Today view. So, how does that work?<!--break--></p> <h2>Days of widgets past</h2> <p><a href='http://www.imore.com/widgets-ios-8-explained' title="Widgets in iOS 8: Explained"><img src='http://www.imore.com/sites/imore.com/files/styles/large/public/field/image/2014/06/wwdc_2014_widgets_auction.jpeg?itok=9Zqkq8lR' />[/url]</p> <p>The idea of "widgets" date back to the early days of graphical user interface (GUI) computing. The Xerox Star, Apple's Lisa and Macintosh, Microsoft's Windows, and others, were all based on the "desktop metaphor". While that included things like files and folders, notebooks and ledgers, it also included tools like calculators and calendars. The pixels may have been chunky, the colors next to nonexistent, and the internet still just a dream, but it was a beginning.</p> <p>With the rise of ubiquitous online connectivity, widgets took on a new roll: dedicated, glance-able information containers. Apple introduced their vision of web-based widgets in OS X Tiger with Dashboard.</p> <p>The original iPhone was supposed to include a version of OS X-style Dashboard widgets, namely Weather and Stocks. They wouldn't have looked or acted any differently than any other full-screen iPhone app, but they would have been built like Dashboard widgets, using Apple's web technologies instead of native Objective-C. Since the presentation was to be no different, and the limits of WebKit at the time meant performance wasn't as good as native apps, they were ultimately rewritten in Objective-C anyway.</p> <p>Other platforms, including Nokia (pre-Windows Phone) and Android went ahead with widgets. What's more, they distinguished them from full-screen apps by making them smaller and letting them live on the home screen, amid the app icons. Power users loved them, but few mainstream customers embrace them. According to HTC, a prominent vendor of Android devices:</p>
<ul><li>Widgets aren't widely used – weather, clock and music are the most used and after that, fewer than 10% of customers use any other widgets.</li> <li>Most of you don't modify your home screens much. In fact, after the first month of use, approximately 80% of you don't change your home screens any more.</li> </ul>
<p>With iOS 5, Apple brought limited widgets — our old friends Weather and Stocks — to the iPhone and iPad. Instead of putting them on the home screen, however, Apple put them in the then-brand new <a href="http://www.imore.com/notification-center" title="Notification Center settings, setup, help, and how-to">Notification Center[/url].</p> <p>For Apple, the iOS home screen was never meant to be a destination but rather a transport. It was never meant for anyone to stop and stare at, but to quickly find and get into apps. When the App Store made apps more abundant, Apple added Spotlight as an ancillary way to help do just that.</p> <p>Notification Center changed things. It could be pulled down from anywhere, including the home screen (and eventually the lock screen), and more importantly, from inside any app. Instead of having to leave what you were doing to go find information, you could pull that information to wherever you were, whenever you wanted, and then go right back to what you were doing with very little cognitive load. It wasn't perfect, but it was better.</p> <p>iOS 7 split notifications and widgets apart, putting widgets in their own Today view, moving Weather to the Today Summary, and adding support for Calendar, Reminders, predictive location, and the Tomorrow Summary. Yet they were still limited to built-in apps and services.</p> <p>iOS 8 and Extensibility take it even further, allowing App Store apps to offer up their own Today view widgets, easily accessible from anywhere on the iPhone or iPad, informational and interactive.</p> <h2>How custom widgets work</h2> <p><a href='http://www.imore.com/widgets-ios-8-explained' title="Widgets in iOS 8: Explained"><img src='http://www.imore.com/sites/imore.com/files/styles/large/public/field/image/2014/06/wwdc_2014_widgets_today_view.jpeg?itok=xUGIK8Ed' />[/url]</p> <p>If you've used Notification Center's Today view in iOS 7, you already know how custom widgets are going to work in iOS 8. You just pull down Notification Center from the lock screen (if enabled), home screen, or from within any app, and if you're not already in the Today view, you simply tap the Today tab at the top.</p> <p>In iOS 8, the built-in widgets provided by Apple include Today Summary, Traffic Conditions, Calendar, Reminders, Stocks, and Tomorrow Summary.</p> <p><a href='http://www.imore.com/widgets-ios-8-explained' title="Widgets in iOS 8: Explained"><img src='http://www.imore.com/sites/imore.com/files/styles/large/public/field/image/2014/06/wwdc_2014_widgets_new_widget_available.jpeg?itok=Wuall09E' />[/url]</p> <p>What's new is what's at the bottom: an Edit button and a notification area that tells you how many new third-party widgets are available to you. Tap the Edit button and you can enable or disable any of the built-in widgets and reorder them any way you like. Tap the New Widget notification and you can add any new, custom widget that has become available.</p> <p>New widgets become available when you install an app from the App Store. If the app includes a widget, the widget notification area will tell you about it. Tap the widget you want added, and it's added. Once added, you can order App Store widgets just like the built-in widgets, and remove them if and when you decide you no longer want or need them.</p> <p>For example, if you download a sports news network app, it could include a widget that presents you with up-to-date scores of the two most recent games in any league you choose to follow, as well as a headline or two of breaking news. Or, if you download a social networking app, it could include a couple status entries, and maybe a Show More option to see even more entries. A package tracker app's widget could keep you up-to-date on all your deliveries. Breaking news, latest weather — all of those, and more, could provide glance-able widgets right in the Notification Center Today view.</p> <h2>Interactive widgets and limitations</h2> <p><a href='http://www.imore.com/widgets-ios-8-explained' title="Widgets in iOS 8: Explained"><img src='http://www.imore.com/sites/imore.com/files/styles/large/public/field/image/2014/06/wwdc_2014_widgets_interactive_bid.jpeg?itok=gszQsrmK' />[/url]</p> <p>Like the new notification system, the new widget system in iOS 8 is interactive. So, not only can the widgets provide you with snippets of information, they can also allow you to perform minor tasks as well.</p> <p>For example, an auction widget can show you the items you've last bid on and whether or not you're currently being outbid, but also allow you to up your bid right there in the widget and retake the lead. A social widget can let you glimpse a few entries in your timeline and Like or Repost right from the widget.</p> <p>What widgets can't do is invoke the keyboard, which means widgets can't take text input the way a Messages quick reply notification can. Complex actions are also beyond the scope of widgets. So, for example, you can't change which stocks are shown in the Stock widget. They simply reflect the stocks shown in the Stocks app. In order to change the widget, you have to change the app.</p> <h2>How developers add widgets to apps</h2> <p><a href='http://www.imore.com/widgets-ios-8-explained' title="Widgets in iOS 8: Explained"><img src='http://www.imore.com/sites/imore.com/files/styles/large/public/field/image/2014/06/wwdc_2014_widgets_add_widget.jpeg?itok=z3IiBtPg' />[/url]</p> <p>For developers, widgets in the Today view are remote view controllers. They're best thought of as independent "child" apps all their own that present themselves and their data to Notification Center. That gives them a number of advantages, including security (see below). It also means that the container app doesn't need to be running in order for the widget to be working. Even if a the container app becomes a memory drain and gets jettisoned, someone using the widget at that very moment wouldn't even notice.</p> <p>It's that type of seamless user experience Apple is stressing with widgets.</p> <p>Performance is paramount. Since a typical person may have several widgets running at once, and resources are always limited, developers need to keep things simple and streamlined. Whenever someone pulls down Notification Center to access a widget, the data needs to be there, ready and waiting. That means pulling in anything big and new in the background and caching it so that it can persist in the widget for as long as it needs to.</p> <p>For the interface, Notification Center defines the width and a default height, but developers can alter the height as needed. That's done by defining vertical constraints with Auto layout or by setting it manually in code. Widgets can also expand in size, either because the content itself changes, or as the result of a user action, like tapping a Show More button. Notification Center will handle the size change and, of course, animate it. Developers get to animate their content changes within it. However, Apple encourages developers not to make widgets so long that people will need to scroll to see all of them.</p> <p>There are a number of resources available to aid in all this:</p> <ul><li>WWDC 2014 Creating Extensions for iOS and OS X session, Part 1</li> <li>Apple (pre-release) Extensibility documentation</li> </ul><h2>Widget security</h2> <p><a href='http://www.imore.com/widgets-ios-8-explained' title="Widgets in iOS 8: Explained"><img src='http://www.imore.com/sites/imore.com/files/styles/large/public/field/image/2014/06/wwdc_2014_extensibility_security.jpeg?itok=eev67Ss-' />[/url]</p> <p>The thing about Extensibility and widgets is that Apple claims they provide extra functionality without sacrificing the excellent security model iOS was built on. This is a big part of the reason it took so long for App Store widgets to appear — Apple had to do a tremendous amount of work over the course of several years and several releases to make it all possible. Things like porting Apple's interprocess communication system, XPC, from OS X to iOS.</p> <p>In iOS, apps are "sandboxed". That means they can only access their own data, not the data of any other app or the system. There are some exceptions, but those require the granting of explicit permission. For example to access contacts or photos, or to "open in" another app, a button tap is required. All of this so that, if anything malicious ever does manage to get in, it's very, very hard for it to go anywhere else or grab any data from anywhere else.</p> <p>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.</p> <p>So, for widgets, Notification Center is the host. The widget communicates only with Notification Center, not with its container app at all. (Which is why container apps don't have to be running, or can be jettisoned without affecting the widget.) When a widget needs information from its container app, it does so through iOS, and through privately shared data resources.</p> <p>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 cryptograph. I'm willing to bet Extensibility is enjoying something just as well thought out and just as secure.</p> <h2>Bottom line</h2> <p>What's most impressive about Extensibility in general and widgets in specific is that Apple has set them up to work the same in both OS X and iOS. That involved a lot more work on their part — shortcuts for one system or the other couldn't be exploited — but ultimately consistency is a feature, and that discipline has resulted in a more unified, better framework for both developers and customers.</p> <p>It's taken a long time for custom widgets to arrive on iOS, but there's every indication Apple has done them in the right way and put them in the right place.</p> <p>Will you be using them? And if so, any particular third-party widgets you're most looking forward to?</p> </div></div></div><div id="comment-wrapper-nid-25418"></div><img width='1' height='1' src='http://tipb.com.feedsportal.com/c/33998/f/616881/s/3c06cd4b/sc/4/mf.gif' border='0'/><br clear='all'/>

<a href="http://da.feedsportal.com/r/199120243373/u/49/f/616881/c/33998/s/3c06cd4b/sc/4/rc/1/rc.htm" rel="nofollow"><img src="http://da.feedsportal.com/r/199120243373/u/49/f/616881/c/33998/s/3c06cd4b/sc/4/rc/1/rc.img" border="0"/>[/url]
<a href="http://da.feedsportal.com/r/199120243373/u/49/f/616881/c/33998/s/3c06cd4b/sc/4/rc/2/rc.htm" rel="nofollow"><img src="http://da.feedsportal.com/r/199120243373/u/49/f/616881/c/33998/s/3c06cd4b/sc/4/rc/2/rc.img" border="0"/>[/url]
<a href="http://da.feedsportal.com/r/199120243373/u/49/f/616881/c/33998/s/3c06cd4b/sc/4/rc/3/rc.htm" rel="nofollow"><img src="http://da.feedsportal.com/r/199120243373/u/49/f/616881/c/33998/s/3c06cd4b/sc/4/rc/3/rc.img" border="0"/>[/url]

<img src="[url]http://da.feedsportal.com/r/199120243373/u/49/f/616881/c/33998/s/3c06cd4b/sc/4/a2.img" border="0"/>[/url]<img width="1" height="1" src="http://pi.feedsportal.com/r/199120243373/u/49/f/616881/c/33998/s/3c06cd4b/sc/4/a2t.img" border="0"/><img src="http://feeds.feedburner.com/~r/TheIphoneBlog/~4/SrYcTnMW6Pw" height="1" width="1"/>

Source: Widgets in iOS 8: Explained
Logged
Pages: [1]   Go Up
  Print  
 
Jump to: