Skip to content

Instantly share code, notes, and snippets.

@huobazi
Last active September 6, 2019 03:12
Show Gist options
  • Save huobazi/5081ef0d9fb1d8413a4d0a68ddfa92ae to your computer and use it in GitHub Desktop.
Save huobazi/5081ef0d9fb1d8413a4d0a68ddfa92ae to your computer and use it in GitHub Desktop.
flutter 真机调试无法连接到 iphone
 flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, v1.7.8+hotfix.4, on Mac OS X 10.14.4 18E226, locale en-CN)
⣻ideviceinfo returned an error:
ERROR: Could not connect to lockdownd, error code -21

解决办法

brew update
brew uninstall ideviceinstaller
brew uninstall libimobiledevice
brew install --HEAD libimobiledevice
brew link --overwrite libimobiledevice
brew install --HEAD  ideviceinstaller
brew link --overwrite ideviceinstaller
sudo rm -rf /var/db/lockdown/*
sudo chmod -R 777 /var/db/lockdown

ref:

flutter/flutter#22595

libimobiledevice/libimobiledevice#721

Permission denied @ unlink_internal - /usr/local/.....

解决办法:

sudo chown -R $(whoami):admin /usr/local
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment