iPhone battery problem—iPhone Troubleshooting
Connect the device to your computer (not your keyboard) using the included cable to charge the battery and sync. Your computer must be turned on and not in sleep or standby mode. If the device is connected to a computer that’s not turned on or is in sleep or standby mode, the battery may drain. [...]