I created a function which checks whether the iPhone is charging or not using UIDevice
. Where should I call the function so that it monitors the status throughout the app session? The Function is called "connectivityStatus", at present it's in viewWillAppear
.
Language : Swift 3
Platform : iOS 10 (Using UIDevice)