以下のようなエラーがでた。
~: flutter doctor -v
[✓] Flutter (Channel dev, v1.2.1, on Mac OS X 10.14.2 18C54, locale ja-JP)
• Flutter version 1.2.1 at /Applications/flutter
• Framework revision 8661d8aecd (6 days ago), 2019-02-14 19:19:53 -0800
• Engine revision 3757390fa4
• Dart version 2.1.2 (build 2.1.2-dev.0.0 0a7dcf17eb)
⣻Unhandled exception:
Exception: ideviceinfo returned an error:
ERROR: Could not connect to lockdownd, error code -19
# 0 IMobileDevice.getInfoForDevice (package:flutter_tools/src/ios/mac.dart:141:9)
<asynchronous suspension>
# 1 IOSDevice.getAttachedDevices (package:flutter_tools/src/ios/devices.dart:156:55)
<asynchronous suspension>
# 2 IOSDevices.pollingGetDevices (package:flutter_tools/src/ios/devices.dart:110:57)
# 3 PollingDeviceDiscovery.devices (package:flutter_tools/src/device.dart:171:52)
<asynchronous suspension>
# 4 DeviceManager.getAllConnectedDevices (package:flutter_tools/src/device.dart:99:46)
<asynchronous suspension>
# 5 DeviceValidator.validate (package:flutter_tools/src/doctor.dart:694:54)
<asynchronous suspension>
# 6 Doctor.startValidatorTasks (package:flutter_tools/src/doctor.dart:116:52)
# 7 Doctor.diagnose (package:flutter_tools/src/doctor.dart:189:41)
# 8 _AsyncAwaitCompleter.start (dart:async/runtime/libasync_patch.dart:49:6)
# 9 Doctor.diagnose (package:flutter_tools/src/doctor.dart:179:24)
# 10 DoctorCommand.runCommand (package:flutter_tools/src/commands/doctor.dart:48:39)
# 11 _AsyncAwaitCompleter.start (dart:async/runtime/libasync_patch.dart:49:6)
# 12 DoctorCommand.runCommand (package:flutter_tools/src/commands/doctor.dart:34:42)
# 13 FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:545:18)
# 14 _asyncThenWrapperHelper.<anonymous closure> (dart:async/runtime/libasync_patch.dart:77:64)
# 15 _rootRunUnary (dart:async/zone.dart:1132:38)
# 16 _CustomZone.runUnary (dart:async/zone.dart:1029:19)
# 17 _FutureListener.handleValue (dart:async/future_impl.dart:126:18)
# 18 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:639:45)
# 19 Future._propagateToListeners (dart:async/future_impl.dart:668:32)
# 20 Future._complete (dart:async/future_impl.dart:473:7)
# 21 _SyncCompleter.complete (dart:async/future_impl.dart:51:12)
# 22 _AsyncAwaitCompleter.complete.<anonymous closure> (dart:async/runtime/libasync_patch.dart:33:20)
# 23 _rootRun (dart:async/zone.dart:1124:13)
# 24 _CustomZone.run (dart:async/zone.dart:1021:19)
# 25 _CustomZone.bindCallback.<anonymous closure> (dart:async/zone.dart:947:23)
# 26 _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
# 27 _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
# 28 _runPendingImmediateCallback (dart:isolate/runtime/libisolate_patch.dart:115:13)
# 29 _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:172:5)
ideviceinfo のコマンド単独で失敗する。
~: ideviceinfo
ERROR: Could not connect to lockdownd, error code -19
以下のように、ideviceinstallerを削除して再インストールしたら解決した。
brew update
brew uninstall --ignore-dependencies libimobiledevice
brew uninstall --ignore-dependencies usbmuxd
brew install --HEAD usbmuxd
brew unlink usbmuxd
brew link usbmuxd
brew install --HEAD libimobiledevice
brew install ideviceinstaller
なお、単に usbmuxd を kill すればよいという説もみかけた。
sudo pkill usbmuxd