Solved 9/12/2022
I wrote the post below when I used an iPhone 8. When I went to an iPhone 13 it seemed to resolve, but today I tried charging my iPhone from my Air and it was beeping again.
I didn't have time to waste so I switched to a normal charger, but later it occurred to me that there might be a way to reset the trust relationship.
There is, but it's not on the iTunes side. It's on the iPhone side.
If you don't want to trust a computer or other device anymore, change the privacy settings on your iPhone, iPad, or iPod touch. Go to Settings > General > Transfer or Reset [Device] > Reset > Reset Location & Privacy. Now when you connect to formerly trusted computers, the Trust alert will ask you whether you trust that computer.
I did the reset on my iPhone and next time I plugged it in to my Mojave Air I got the "do you want to trust" dialog. I accepted it and now the phone charges without beeping. I suspect the problem will recur based on the notes below however.
--
When I plug my iPhone 8 into my MacBook Air's USB port I get relentless beeping and the iPhone power icon flashes. Sometimes iTunes throws up a "received an unexpected response" error. I'm on Mojave iTunes.
I figured this was a bad USB cable or bad port or bad connection, but it's both ports and all cables and the phone connection is good. More importantly, I rebooted with no peripherals connected and switched to my admin account. Then every beep was associated with a new iTunes dialog asking me (yet again, and again, this is such a pain) to authenticate. When the dialogs ended the beeping stopped.
Stack Exchange has an article on this, but that's definitely connection issue related. This Apple tech article seems closest; but they also focus on cable issues.
I'm not entirely sure it's not something hardware related on my Air, but I think there's an iTunes component too.
The console shows:
I see: usbmuxsd errors, HandleUSMMuxConnect, iTunes Helper, MobileDeviceUpdater, "no such device". So iTunes is causing the beeps (though the underlying issue could be hardware).
From those clues I found these posts:
- https://discussions.apple.com/thread/251691536: kill usbmuxsd related processes
- https://discussions.apple.com/thread/6611777?answerId=27079314022#27079314022 - a bug in usbmuxsd that Apple may have fixed in later releases
- https://discussions.apple.com/thread/6728641?answerId=6728641021#6728641021 has a discussion:
It's an iTunes 12 bug... Not sure who's responsible for usbmuxd at Apple, but they should be fired! This was extensively discussed and worked out here: itunes 12 will not recognize iphone
All credit to oskapt, who's post detailed the entire issue. The short version is a recent version of usbmuxd has a programming error that leads it to never close any connection. At the same time, it's constantly making new connections too. The end result is this background process actually hits the built-in UNIX limit on open connections by a single process (to prevent bugs like this from ultimately crashing an entire computer), and is blocked by design from functioning after that point. Once usbmuxd fails, iTunes can't see your iOS devices.
The fix is to quit usbmuxd, either via Activity Monitor or Terminal. It will automatically relaunch, and work again until it hits the limit. That thread has several suggestions for automated scripts to run every 24-48 hours to prevent this.
Update 2/20/22: I never solved this problem, but I did get a new phone and the beeping is gone. So either a connection problem with the old iPhone or a bug with the "trust relationship" between iPhone and MacBook.
Update 3/5/2022: In the process of cleaning out old iPhones I tried various iPhones and I tried iPhones that beeped on my Mojave iTunes machine on a different machine. I think it's a bug with establishing a Trust relationship. Probably fixed in later versions of iTunes.