Hello,
We are experiencing some issues with our USB accessory unexpectedly charging the iOS device it is connected with only when the iOS device supports USB-C and is on iOS 18+
The following is a description of the discrepancy we note between iOS versions:
- After performing a USB Role switch, our Accessory becomes a typical USB Device and the Apple device becomes the USB host.
with iOS 17:
-
The Accessory then sends a PowerSourceUpdate message to the iOS 17 device via iAP2 protocol. Apple device has a USB Type C Connector. *
-
We are specifying:
- AvailableCurrentForDevice = 0 mA
- DeviceBatteryShouldChargeIfPowerIsPresent = 1.
- Three observations:
- iPad Battery Settings page - we observe 'Last charged to…' (indicating no charging)
- On the Lumify App running (iOS 17), we observe that UIKit.current.batteryState indicated 'Not charging'
- Battery icon on top right of the screen indicates 'No Charging'
with iOS 18:
-
The same Accessory sends the same PowerSourceUpdate message to the iOS 18 device via iAP2 protocol using USB Type C Connector.
-
We are specifying the same:
- AvailableCurrentForDevice = 0 mA
- DeviceBatteryShouldChargeIfPowerIsPresent = 1.
- We observe:
- iPad Battery Settings page - we observe 'Charging'
- On the Lumify App running (iOS 18), we observe that UIKit.current.batteryState indicated 'Charging'
- Battery icon on top right of the screen indicates 'No Charging'
Please could you help us understand why the Battery status is showing as 'Charging' in the Settings page and with the 'UIKit.current.batteryState' even though we have specified 'AvailableCurrentForDevice = 0 mA'?
Since our accessory is heavily reliant on the Battery status / Charging state, is there potentially another way we get an accurate battery charging status that we are missing? Or are there other suggestions outside of what we do currently to ensure our accessory does not place the iOS18 device into a charging state?