Apple offer the batteryState in the UIDevice class:
In iOS12 Apple introduced a new way to check if your device is in “flat” mode, or better is on your desk.
Let’s take a look at the reference:
I’ve lost completely all my blog posts. About 15 years of work, tutorials and articles.
I’m recovering everything, post by post. I’ll be back soon!
START TRANSACTION; DROP DATABASE whiletrue; COMMIT;