HOW TO KNOW IPHONE BATTERY CHARGE IN "SWIFTUI" code example
Example: HOW TO KNOW IPHONE BETTRY CHARGE IN SWIFTUI
UIDevice.current.isBatteryMonitoringEnabled = true
let level = UIDevice.current.batteryLevel
UIDevice.current.isBatteryMonitoringEnabled = true
let level = UIDevice.current.batteryLevel