Swift – Battery level and charger status Alberto Pasca on 30 October 2018 Apple offer the batteryState in the UIDevice class:
Swift – UIDevice orientations using iOS12 Alberto Pasca on 18 October 2018 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: