Whether you want to sync data between your iPhone and Mac or simply want to charge your iPhone, the first thing you’ll need to do is connect the iOS device to your Mac using a USB or USB-C cable.On good days, you plug in the iPhone and everything works smoothly. However, today is different! The iPhone keeps connecting and disconnecting from the Mac. Charging the device also appears impossible since the iPhone keeps charging and discharging when connected to the Mac.How to fix it when iPhone keeps disconnecting from Mac?If you are facing this issue, here are some of the things you can do to fix it —1. Check the basicsThe first thing you need to do if the iPhone connects and disconnects rapidly is check if the Lightning cable is working. To do that, connect the cable back to the brick and see if the iPhone battery charges by connecting it to the power socket. If the battery is charging, the cable is in working condition.It could also be possible that the USB port on the Mac is faulty. Try connecting the Lighting cable to a different port.2. Reset location and privacy settings in iOS If you haven’t connected your iPhone to your Mac for a long time, the system may be having trouble trusting the device. Several users claimed they were able to fix the iPhone rapidly connecting and disconnecting issue by resetting the location and privacy settings in iOS.Go to iPhone settings > Tap on General > Tap on Reset > Tap on Reset Location and Privacy > Confirm the passcode > Tap on Reset Settings.3. Restart the usbd processA solution to the issue of iPhone rapidly disconnecting from a Mac that has worked for many is stopping the usbd process.To do that, open the Terminal app from Spotlight (Command+ Space) and enter the command sudo killall -STOP -c usbd. This will pause the usbd process. Now, connect the USB cable and check if the iPhone is still charging on and off rapidly. If the issue persists, unplug the device and try another command in the Terminal app — sudo killall -CONT -c usbd. This will restart the usbd process.It is important to note that pausing the usbd process reduces the power output of the USB port. In other words, the device will charge slower than usual. However, the iPhone won’t keep on connecting and disconnecting from the Mac.4. Reset SMC and/or NVRAMIf all the above fixes do not work, you can try resetting the SMC which is responsible for managing the behavior of things such as how much power is sent to the USB port.Another setting that you can reset is NVRAM aka Non-Volatile Random Access Memory which stores settings for quick access.So these were some of the solutions that you can try if your iPhone keeps connecting and disconnecting from your Mac. Were you able to fix the issue? Let us know in the comments down below.