Chapter 7WatchKit Extension Lifecycle
By now your watch app is pretty sophisticated. Youâre moving between screens, sending data back and forth, and even replacing your entire UI as needed. But what about all of the other code you want to writeârunning code when the app starts, handling OS events, and the like? On iOS, youâd use your app delegate to handle the appâs lifecycle methods that run when the user starts or leaves the app. The equivalent on watchOS is the extension delegate, a class youâll implement to handle the lifecycle events of your watch app. TapALap already has an extension delegate; it was created automatically by Xcode when we created the project, but it doesnât do anything. In this chapter, youâll implement ...
Get Developing for Apple Watch, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.