New WatchOS 26 App & View Lifecycle

The WatchOS app and view lifecycles for WatchKit and SwiftUI are documented in https://developer.apple.com/documentation/watchkit/working-with-the-watchos-app-life-cycle and https://developer.apple.com/documentation/swiftui/migrating-to-the-swiftui-life-cycle.

WatchOS 26 appears to change the app & view lifecycle from the behavior in WatchOS 11, and no longer matches the documented lifecycles.

On WatchOS 11, with a @WKApplicationDelegateAdaptor set, the following sequence of events would occur on app launch:

  1. WKApplicationDelegate applicationDidFinishLaunching in WKApplicationState .inactive.
  2. WKApplicationDelegate applicationWillEnterForeground in WKApplicationState .inactive.
  3. View .onAppear @Environment(.scenePhase) .inactive
  4. App onChange(of: @Environment(.scenePhase)): .active
  5. WKApplicationDelegate applicationDidBecomeActive in WKApplicationState .active.
  6. App onReceive(.didBecomeActiveNotification): WKApplicationState(rawValue: 0)
  7. View .onChange of: .@Environment(.scenePhase) .active

In WatchOS 26, this is now:

  1. WKApplicationDelegate applicationDidFinishLaunching in WKApplicationState .inactive.
  2. WKApplicationDelegate applicationWillEnterForeground in WKApplicationState .inactive.
  3. App onChange(of: @Environment(.scenePhase)): .active
  4. WKApplicationDelegate applicationDidBecomeActive in WKApplicationState .active.
  5. View .onAppear @Environment(.scenePhase) .active

When resuming from the background in WatchOS 11:

  1. App onChange(of: @Environment(.scenePhase)): inactive
  2. WKApplicationDelegate applicationWillEnterForeground in WKApplicationState .background.
  3. App onReceive(.willEnterForegroundNotification): WKApplicationState(rawValue: 2)
  4. View .onChange of: .@Environment(.scenePhase) inactive
  5. App onChange(of: @Environment(.scenePhase)): active
  6. WKApplicationDelegate applicationDidBecomeActive in WKApplicationState .active.
  7. App onReceive(.didBecomeActiveNotification): WKApplicationState(rawValue: 0)
  8. View .onChange of: .@Environment(.scenePhase) active

The resume from background process in WatchOS 26 is baffling and seems like it must be a bug:

  1. App onChange(of: @Environment(.scenePhase)): inactive
  2. WKApplicationDelegate applicationWillEnterForeground in WKApplicationState .background.
  3. App onReceive(.willEnterForegroundNotification): WKApplicationState(rawValue: 2)
  4. App onChange(of: @Environment(.scenePhase)): active
  5. WKApplicationDelegate applicationDidBecomeActive in WKApplicationState .active.
  6. App onReceive(.didBecomeActiveNotification): WKApplicationState(rawValue: 0)
  7. View .onChange of: @Environment(.scenePhase) active
  8. App onChange(of: @Environment(.scenePhase)): inactive
  9. WKApplicationDelegate applicationWillResignActive in WKApplicationState .active.
  10. App onReceive(.willResignActiveNotification): WKApplicationState(rawValue: 0)
  11. View .onChange of: @Environment(.scenePhase) inactive
  12. App onChange(of: @Environment(.scenePhase)): active
  13. WKApplicationDelegate applicationDidBecomeActive in WKApplicationState .active.
  14. App onReceive(.didBecomeActiveNotification): WKApplicationState(rawValue: 0)
  15. View .onChange of: @Environment(.scenePhase) active

The app becomes active, then inactive, then active again.

The issues with these undocumented changes are:

  1. It is undocumented.
  2. If you relied on the previous process, this change can break your app.
  3. A view no longer receives .onChange of: .@Environment(.scenePhase) .active state change during the launch process.
  4. This bizarre applicationWillEnterForeground - applicationDidBecomeActive - applicationWillResignActive - applicationDidBecomeActive process on app resume does not match the documented process and is just...strange.

Is this new process what is intended? Is it a bug? Can an Apple engineer explain this new App resume from background process and why the View is created slightly later in the App launch process, so it does not receive the .onChange of @Environment(.scenePhase) message?

In contrast, the iOS 26 app lifecycle has not changed, and the iOS 18/26 app lifecycle closely follows the watchOS 11 app lifecycle (or watchOS 11 closely mimics iOS 18/26 with the exception that watchOS does not have a SceneDelegate).

New WatchOS 26 App & View Lifecycle
 
 
Q