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

Diagnosing “Dependency Cycle Between Targets” in Xcode 9’s New Build System

Xcode 9 includes a new build system that can substantially improve build times. The new build system is more strict about build issues, but some of its diagnostic output can be difficult to reason about. One difficult to debug error is “... Continue →