USB ports not working with iPhone and iPad; MacBook Pro Retina 15" Mid 2015
When I plug in either my iPhone or iPad into either port, the connection comes and goes rapidly (such that if my phone is on vibrate, it does not stop vibrating). It is also important to note that both my iPhone and iPad connect normally to wall outlets and other computers. However, I know it's not dirty ports because when I plug in a flash drive or an external HDD, it connects perfectly fine.
Just if needed, as mentioned in the thread's title, it's a MacBook Pro Retina 15" Mid 2015 running macOS 10.14.6 Mojave, 250 GB storage, 16 GB RAM, 2.2 GHz Intel Core i7.
Any ways to fix this, please?
Thanks in advance.
MacBook Pro 15", macOS 10.14