From my reading, Apple does not want us to play with the brightness
I found a lot of interesting information here :
"According to this page, … , apple will remove your application from the app store if you attempt to mess with the brightness. I would really just like to change color schemes based on how much brightness the phone detects."
However, I've downloaded apps that set the brghtness to a maximum (to display a QR Code and ease machine reading).
Strangely enough, there is API to explicitly set brightness of the screen, however that setting is only active while your app is in the foreground. Indeed, for apps like scanners and card wallet type things, they need this functionality to work.
However there's no other support for using this type of thing, for some unknown reason - other than using the camera or the nebulous IOKit
Yes, but is is clearly a temporary setting.
I guess the reason is to avoid someone manipulating brightness in the back of the user, which could at least distract him/her, let think there is a hardware problem, immediately attracting attention from a very bright screen, drain on battery… All leading to a poor user experience
To be clear, there is no public API for reading the ambient light sensor on iOS. I have more to say about this on this thread.
It seems that there is a public API in the IOKit framework …
I/O Kit is not a public API on iOS but, even if it were, you can still get into trouble reading undocumented keys out of the I/O Registry. You can find a classic example of this linked to by the thread referenced above.
Share and Enjoy
Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
let myEmail = "eskimo" + "1" + "@apple.com"