Hacker News new | ask | show | jobs
by gardaani 482 days ago
Another annoying Xcode feature is that building a macOS app with Xcode command line tools (xcodebuild) sometimes complains that my iPhone is locked:

"An error occurred whilst preparing device for development -- Failed to prepare the device for development. Domain: com.apple.dtdevicekit Code: 806 Recovery Suggestion: Please unlock and reconnect the device. The device is locked. Domain: com.apple.dt.MobileDeviceErrorDomain"

1 comments

For those that don't understand exactly how annoying this is, I once took the time to reverse engineer Xcode to figure out exactly where it was coming from and then inject code into it to make it shut up: https://github.com/saagarjha/dotfiles/blob/master/xcodebuild...
Thanks for sharing. Do you build that into your app or should it run as a command line program on its own?
You need to disable SIP and then you can DYLD_INSERT_LIBRARIES (or equivalent) it into xcodebuild