I copied this code and ran it on my iPhone 13. The number does not change. I did confirm that my sensor was working by calling someone to see if my screen turns off.
Topic:
UI Frameworks
SubTopic:
UIKit
Tags: