Watch Extension Lifecycle

One useful addition brought by watchOS 2.0 is the WKExtensionDelegate protocol, which exposes lifecycle events and more. This protocol is similar to UIApplicationDelegate.

WKExtensionDelegate has three methods that let you respond to lifecycle events. The lifecycle methods will seem familiar: applicationDidFinishLaunching(), applicationDidBecomeActive(), and applicationWillResignActive().

There are also several methods you can implement to handle notifications.

And finally, you can implement handleUserActivity() to facilitate Handoff.

 
13
Kudos
 
13
Kudos

Now read this

Implementing Rich Notifications in iOS 10

I’ve spent a bit of time with notification extensions in iOS 10 and they’re pretty great. If you’re not familiar with notification extensions, check out Apple’s Introduction to Notifications talk before reading this post. Anywho,... Continue →