Prevent iPhone from charging when plugged into a battery powered MacBook Air I would like to prevent my iPhone draining power from my MacBook Air while the laptop is not plugged in and relying on battery power. How would I do this? Note, there doesn't seem to be any "unpowered USB ports" on the MacBook Air, both of them seem to charge my iPhone even when the laptop is not plugged into a power socket...
I don't know if there is a software way to do that, but there is an hardware way:


Use an unpowered USB cable (some company makes it, targeting audiophiles), might need an adapter to male lightning.
Tape/Remove the power plugs on your USB cable.


Also, not exactly an answer to your question, but maybe to your use-case:
Build a binary, then export it to iTunes, then upload via wifi.
No debbuger and much less convenient tho.