I want to know if its possible to detect when USB is connected to iPhone device programmatically through private or public frameworks.
I know we can detect this by using UIDeviceBatteryState, but in that case it will only detect charging, unplugged, or not charging states, and will not be able to identify if its charging through USB connected via power source directly or through any other device like mac or any other machine.
Please let me know.