I am attempting to create a switch on my iPhone charging wire so that I can use my device to test iOS applications I'm creating on my Mac without actually charging the device. When I'm working on an app my devices are often charged to 100% and have to be kept charging while I'm working, often for days on end.

So, in an effort to preserve my devices battery, I've split open one of my old iPhone chargers, and after looking up the USB wiring diagram put a toggle switch on the red +5V wire. (not the D+ or D- wires or ground)

Now, the switch works just fine, but the problem is that when the switch is in the off state, not only does the iPhone stop charging (as it should) but the computer also detects that the device has been disconnected, which isn't very useful to me.

Anybody have any thoughts on what could be done to make this work? I'm more of a software guy so I'm not all that familiar with what hardware wise would need to be modified to make this work. Or better yet, if theres anything that can be changed programmatically to make my Mac detect a device that isn't charing that would be awesome! Thanks for any input on this!

  • I'd go for the low tech solution of simply unplugging it at night if it were me - this would be how most people treat their phone anyway, just in reverse (run down during the day, charge at night?) :)
    – Caesium
    Aug 3, 2012 at 1:50
  • @Caesium Yes, but the difference is when the normal user leaves their phone plugged in all night it's simply charing without the constant extra draw that I have. Aug 3, 2012 at 1:56

1 Answer 1


There are these devices, but I'm not sure where you'll find one now. You could also use a non-powered USB hub.

But in all honesty, iPhone lithium ion batteries won't be too damaged by continual charging, it's not like to old days of NiCad (Nickel Cadmium) batteries.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .