DEV Community

Tuan Luong
Tuan Luong

Posted on • Updated on

iOS devices connecting and disconnecting rapidly

I have been struggled with this issue for years. When connect my iPad to my Macbook Pro, it connected and disconnected then connected and disconnected.... This make me crazy sometime. Today I decided to research for a solution.

After googling, I found this thread https://www.ifixit.com/Answers/View/473839/iOS+devices+connecting+and+disconnecting+rapidly.

Below are some methods I tried.

1. Reset SMC

- Unplug the power, then shut down your Mac.
- Hold the left Shift+Control+Option keys down, then press and hold the power button down. Keep all four buttons pressed down for ten seconds, then let go.
- Plug the power cable back in, then turn on your Mac.
Enter fullscreen mode Exit fullscreen mode

2. Reset the privacy settings in iOS

Settings > General > Reset > Reset Location & Privacy
Enter fullscreen mode Exit fullscreen mode

3. Restart usbd deamon program

Open terminal, run this

sudo killall usbd
Enter fullscreen mode Exit fullscreen mode

If not work, try this

sudo killall -STOP -c usbd
Enter fullscreen mode Exit fullscreen mode

And lucky me. My iPad can connect with my Macbook Pro after running sudo killall -STOP -c usbd and now I can debug using my iPad.

You can add alias to make quick access to it

echo -n "alias fix-ios='sudo killall -STOP -c usbd'" >> ~/.zshrc
Enter fullscreen mode Exit fullscreen mode

Later then, just run fix-ios

If you got this issue, please try then let me know which one works for you.

Happy ending!

Top comments (0)