Chosen Solution

Hi, My IPhone works good and charging if its on, but when turn off or battery dead it won’t charging !! in another words while phone off it won’t detect that you plugged in charger. Please help Amin

Are you certain that the battery charges while the phone is on? How have you charged it when the battery is dead (because you can’t turn it on)? What happened to the phone (drops or impacts, previous repairs, water damage)? The charging circuit is primarily composed of two IC’s; Tristar, which communicates with the charging device and the CPU, and Amber, which is the PMU that drives the charge to the battery (among other things). Normally, when you plug in a charger, it communicates with Tristar which then tells Amber to charge the battery or not depending on what level the battery is at. My point is, it should work one way or the other. Please insure you are using an Apple Genuine Lightning Cable and Charging Block. You can also open up the phone and measure the voltage at the battery to see if it is really dead or not.

Have you already tried to replace the dock connector?