How do I make my iOS app detect when the device is charging?

Edit
Report