USB Accessory Device Charging Behavior Changed with iOS18

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:

  1. AvailableCurrentForDevice = 0 mA 
  2. DeviceBatteryShouldChargeIfPowerIsPresent = 1.
  • Three observations:
  1. iPad Battery Settings page -  we observe  'Last charged to…' (indicating no charging)
  2. On the Lumify App running (iOS 17), we observe that UIKit.current.batteryState indicated 'Not charging'
  3. 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:

  1. AvailableCurrentForDevice = 0 mA
  2. DeviceBatteryShouldChargeIfPowerIsPresent = 1.
  • We observe:
  1. iPad Battery Settings page -  we observe  'Charging' 
  2. On the Lumify App running (iOS 18), we observe that UIKit.current.batteryState indicated 'Charging'
  3. 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?

So, three points here:

  1. The MFi program has its own support process, which you can find more information on in the "MFi Portal Technical Support" section of the MFi Licensing Handbook on the MFi portal. I have one brief comment (see below), but a more detailed investigation should go through that process.

  2. Regardless of what you find (see below), please file a bug on this and then post that number back here. Something is obviously wrong here and we should correct that.

  3. Has anything actually changed in terms of what's actually happening on the USB bus? If actual bus behavior hasn't changed, then I think this is basically just a bug. Note that the main reason split behavior like this happen:

  1. iPad Battery Settings page - we observe 'Charging'
  2. On the Lumify App running (iOS 18), we observe that UIKit.current.batteryState indicated 'Charging'

Versus:

  1. Battery icon on top right of the screen indicates 'No Charging'

...is that the first two case are pulling from one API and the second case is pulling from a different (typically lower level) API.

In any case, the first thing to sort out here is whether there's been an actually behavior change here (and the battery indicator is wrong) or whether UIKit.current.batteryState is just returning the wrong value.

__
Kevin Elliott
DTS Engineer, CoreOS/Hardware

USB Accessory Device Charging Behavior Changed with iOS18
 
 
Q