Unexpected sceneDidBecomeActive called during screen lock in iOS 27

I've noticed a strange issue with the SceneDelegate lifecycle in iOS 27.

[Environment]

iOS 27 (Also tested on physical devices)

UIKit / SceneDelegate based App

[Description & Steps to Reproduce] When the app is in the foreground and the user locks the screen (presses the power button):

In iOS 26 and earlier: sceneWillResignActive is called exactly once. (Expected behavior)

In iOS 27: The following sequence is called rapidly in succession:

  • sceneWillResignActive (Screen lock initiated)

  • sceneDidBecomeActive

  • sceneWillResignActive (Locks completely)

When the user unlocks the screen later, sceneDidBecomeActive is called once as usual.

[Impact] Because sceneDidBecomeActive is unexpectedly fired while the device is locking, it triggers foreground logics right before the app is pushed to the background. This is causing unwanted side-effects and glitches.

Has anyone else encountered this unbalanced lifecycle issue in iOS 27? I'd like to know if there's a better approach or if Apple is aware of this.

Thanks!

Same issue here. On simulator it also occurs on iOS 18 and iOS 26. On a real device I did not notice it before iOS 27 (unsure if the issue was there). It has also been reported for iOS 26: https://developer.apple.com/forums/thread/814895

My workaround is to use sceneWillEnterForeground in stead of sceneDidBecomeActive.

Unexpected sceneDidBecomeActive called during screen lock in iOS 27
 
 
Q