Take it to the Apple store. Make an appointment before going or you may end up waiting over an hour to be served. They wiped our IPad Pro to its original settings & charged us nothing. Process took about 20minutes. Son said go to settings & go to USB options, select file transfer w/charging options rather than charging only option.
I tried but my phone won't connect to the computer
Look up the steps to put your device into recovery mode and then restore the iOS to default from iTunes. Then restore your data from icloud
Thanks! Your answer is awaiting moderation.