It could just be gunk inside the charging port. It happened to my iPhone which, when charging in my car, the cable kept on dropping out. I brought it to an Apple Authorized Service Provider and they just took out a very tiny brush, looked like a pipe cleaner, and in a few seconds cleaned out the built-up junk. It worked again, like brand new. Ever since I did it myself, to all my devices with a lightning cable port. I would take a wooden toothpick and work on one end to loosen and soften the fibers of the wood so it flared out like the brush that they used.The charging port for my Ipad is loose. Is there a way to fix this?