I would like to know the status of a dead battery when the application is running, but is there any way to get the status just before the battery runs out?
Is there any way to get the status of the battery right before it runs out?
UIDevice.current.isBatteryMonitoringEnabled = true
UIDevice.current.batteryLevel
but please tell us how to get the status of power off, etc. as well.