Lightning charger only works when the device is turned off
So basically I got this lightning charger that only works when I turn off my iPad or my iPhone.
The way I have to make it work is that when the device is turned on , I plug the charger and nothing comes up , the charger does not charge the device , but after that I turn off completely the device and after a few hours of charging it while its off , when I turn it on again it actually charged.
Also when the device is fully turned off and I plug in the charger , It will make the device turn on but then it wont charge
It's not an issue from the iPad or the iPhone , because when I use other apple chargers or 3rd party chargers they do charge the device when it's turned on.
What could be the issue with the lighting charger then?
iPhone 5s, iOS 12