Imported from the Apple Support Forums via the Wayback Machine 🔗
What versions of iOS, iTunes and OS X are involved? iOS 12 on a Mac needs iTunes 12.8.0.150 or better running on OS X 10.11.4 El Capitan or better. Assuming that is the case try the following:
In Finder use the menu item Go > Go to Folder..., copy the following text, paste it into the dialog box and press enter:
Unlock your device and connect it to USB. Double click on MobileDeviceUpdater in the folder that has opened. It should notify you of a software update. Install it and iTunes should hopefully recognize and connect to your device.