I'm developing a native macOS menu-bar utility that aims to toggle USB power to an iPhone connected directly to a MacBook Pro.
Hardware:
MacBook Pro with M2 Pro
iPhone 13 connected via USB-C to Lightning
No external hubs or adapters
Goal:
I want to temporarily stop the iPhone from charging without physically disconnecting the cable, then restore charging programmatically.
Losing the USB data connection while power is disabled is completely acceptable.
What I've investigated:
uhubctl doesn't expose the built-in USB-C ports as controllable in my setup.
IOKit and USBDriverKit provide USB device management, but I haven't found a supported method to disable physical VBUS.
I found IOUSBHostCIMessageTypePortPowerOff, but it appears to relate to host-controller interfaces rather than controlling Apple's existing USB-C hardware.
My questions:
Is there any supported API or system-level mechanism for disabling VBUS on a MacBook's built-in USB-C port?
Can the USB-C Power Delivery controller be instructed to stop supplying power without physically disconnecting the device?
Alternatively, is there a supported mechanism for requesting that a connected iPhone temporarily stop drawing charging current?
I'm open to lower-level macOS development if necessary, but I'd like to understand whether this is technically possible before pursuing it.
Any insight from Apple engineers or developers familiar with Apple Silicon USB controllers would be greatly appreciated.
2
0
115