I broke a wire in the iPhone/iPad end of a six-foot after-market extension cable a few days ago. Can't blame the cable maker though, over the last several months I've picked up my iPhone a few times in dim light to put it in my pocket and not realized it was plugged in until the cord jerked the 30-pin connector out of the phone, and none too gently as I was in a hurry and moving quickly.
It became clear there was a broken wire after the last time, as the cable started charging intermittently if the wire going into the connector was wiggled. A few days ago it stopped working altogether. I ordered two new cables, but they have been slow to ship and I was getting impatient for a replacement cable.
Today I elected to take a closer look at the failed cable to see if it could be repaired. First I had to get it open, so I held the metal portion (gently) with pliers and pulled on opposite ends of the plastic cover. It started sliding off, so I was making progress, then suddenly it released completely and because I had the cable tangled in my fingers I found myself with the metal part and pliers in one hand and the cable in the other and no connection at all between them.
Looking closer I saw that three of the wires had small pins attached by solder, while a fourth wire had no pin, that one was still in the metal connector. My first thought was that the connector was ruined beyond recovery, not to mention I had no notion of which pin went in which hole of the connector, but I elected to do a Google search for wiring information and ran across this thread. While it didn't really give me any useful information, it did tell me that someone else had gone seeking information on repairing a cable.
Studying the very small pins it became apparent by their shape where each wire and pin belonged. The broken wire of course was obvious since its pin was still in place. I pulled that pin to examine it and found the non-soldered end had a slight hook in it and I noted the orientation. The pins that had pulled out also had such shapes, and when I aligned them all with the hook in the same orientation as the one I'd pulled, one's soldered end was bent to the left, one was straight, and the third's soldered end was bent to the right. It seemed clear to me that they were bent like this to maximize the air gap between the solder joints when they were in the connector.
There were three empty holes in the connector, all on one end and so I reinserted them in that order and oriented as the black wires pin. Easier to say than to do, but using needle-nose pliers and patience, I finally accomplished it. I don't know if it was needed, but then I put a very small drop of a rubber and plastic effective superglue on the base of the pin where it entered the connector in hopes that would make sure it didn't back out with use.
I took a moment to test fit the connector into my phone so that I could determine how to position the plastic outer covering that has the orientation mark on it. Normally these things face "up" as you position the connector to go into the phone, and I didn't want this one to be different. Finally I slid the cover up the wire and over the metal connector, and then inserted the retaining piece that goes on the end to lock it in place. The job was done at that point, but I put a small drop of glue on the interface between the cable outer surface and the reinforcing plastic where it enters the connector with the intent that any future cable pulls would not easily stress the wires again. I never intended to remove the connector by pulling the cable, but accidents happen.
I plugged the cable into power and plugged the other end into my phone and it indicated power and that it was charging. Wiggling the wire had no effect so I consider this a successful recovery for about 30 minutes of my time. It wasn't about avoiding the expense of a new cable really, as I mentioned at the start I have two ordered, rather about not having to wait on delivery.
In case the wiring scheme is useful to someone else, I've included a photo of the connector after the pins were reinserted. My solder repair was to the black wire in the middle of the plug by the way, and I used much less than the original assemblers did on the other three pins. While it may appear in the photo that the solder joints nearly touch, that is not the case. By rotating the plug you note that between the bend of the pins and the actual solder point location, all have good clearance.