Hello,
I am trying to add some logging for Thermal State Changes in my iOS app. I have followed the instructions outlined in this documentation, however I am not recieving the notifications for thermal state change.
I know I have set the code up correctly because I have switched NSProcessInfoThermalStateDidChangeNotification out for NSProcessInfoPowerStateDidChange and my code runs as expected.
I have tried
I am trying to add some logging for Thermal State Changes in my iOS app. I have followed the instructions outlined in this documentation, however I am not recieving the notifications for thermal state change.
I know I have set the code up correctly because I have switched NSProcessInfoThermalStateDidChangeNotification out for NSProcessInfoPowerStateDidChange and my code runs as expected.
I have tried
enabling various thermal device conditions via Xcode
heating up the actual device until I received the tempurature notification then allowing the device to cool back down while using my app
Does your code even read the thermalState property, that is, outside of your notification handler? Looking at the code it’s this initial read that sets up the notification mechanism.
[And yeah, that’s super non-obvious, so if this is the problem then we’ll definitely be filing a bug against the docs!]
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@apple.com"
[And yeah, that’s super non-obvious, so if this is the problem then we’ll definitely be filing a bug against the docs!]
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@apple.com"