Sunday, February 27, 2011, 07:00 pm PT (10:00 pm ET)
Inside Mac OS X 10.7 Lion: Crash or continue, push notificationsDevelopers have noted two interesting features in progress within the Mac OS X Lion release, one being the ability to continue an application poised to crash, and a second being the foundation of push notifications in Mac OS X.
Crash or continue
When Lion encounters an app that raises an exception and fails to properly handle it (essentially throwing an object in the air and filing to catch it), it now offers the user the choice of either allowing the app to crash or a new option of continuing to allow the app to run.
While this results in the app running in an inconsistent state, it does allow the user at least an attempt at saving data in any open files before quitting the app are restarting it fresh.
The error dialog below indicates how an app that suffers a internal error presents the option to the user, providing a look at what caused the problem.
Another feature discovered in the bowels of Lion is the foundation of push notifications, something Apple originally created for iOS. While apparently not yet fully functional, a developer reports that "the whole range of callbacks for iOS push notifications have been added to NSApplicationDelegate."
- (void)application:(NSApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken NS_AVAILABLE_MAC(10_7);
- (void)application:(NSApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error NS_AVAILABLE_MAC(10_7);
- (void)application:(NSApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo NS_AVAILABLE_MAC(10_7);
Apple's push notification system allows developers to create services that update the user with notices of new information. The feature is most useful in mobile devices, where constantly polling the network for new emails, news, or other content is a waste of battery life. However, it appears that a consistent push notifications mechanism across both Mac OS X and iOS could be useful in delivering software that works the same on both systems.
Push notifications work by holding an IP connection open, waiting for a message. Essentially, it's like waiting for the phone to ring rather than running to the mailbox every few minutes to see if you've received a reply. Apple's Push Notification Server currently relays messages to iOS users, which can be badge number increments, short messages, or sounds.
Apple has shared a great deal of technology between iOS and Mac OS X, and continues to do so everywhere it makes sense. The result has been not only shared effort on Apple's side, but also a familiar and usually consistent environment for developers who want to target both.
On Topic: Mac OS X
- Microsoft says public beta of new Office for Mac coming in first half of 2015
- Users report slow Wi-Fi, dropped connections after upgrading to Apple's OS X Yosemite
- Rumor: Office for Mac to get Retina redesign, feature parity with Windows in Q1 2015
- First-week OS X Yosemite adoption rate outpaces Mavericks, now at 12.8%
- Getting the most out of the revamped OS X Spotlight search in Yosemite