"Could not connect to lockdownd" while attempting to run flutter app
Disconnect all iOS devices, then:
brew uninstall ideviceinstallerbrew uninstall libimobiledevicebrew install --HEAD libimobiledevicebrew link --overwrite libimobiledevicebrew install --HEAD ideviceinstallerbrew link --overwrite ideviceinstallersudo rm -rf /var/db/lockdown/*
Connect an iOS device, and choose "Trust" when prompted, after that:
sudo chmod -R 777 /var/db/lockdown/
This workaround worked for me when loosing the connection:
- close everything (Visual Studio Code, Xcode, Simulator)
- disconnect any physical device
- Start Visual Studio Code
- connect a physical IOS phone
- Start XCode
- build from XCode (it will work)
- Disconnect your physical device
- Start without debug
- You will be prompted to connect to a device
and from there it worked again!
This just to help to debug the loos of connection bug. I have also observed that it begins just after the "stop debugging" command from Visual Studio Code.
I was having similar issues, and resolved them using the below. Hopefully this will help you. flutter doctor
was telling me the answers, but they were a bit buried. Look for something like this:
[-] iOS toolchain - develop for iOS devices (Xcode 8.3.3) • Xcode at /Applications/Xcode.app/Contents/Developer • Xcode 8.3.3, Build version 8E3004b ✗ libimobiledevice and ideviceinstaller are not installed or require updating. To update, run: brew uninstall --ignore-dependencies libimobiledevice brew install --HEAD libimobiledevice brew install ideviceinstaller • ios-deploy 1.9.1 ✗ ios-deploy out of date (1.9.2 is required). To upgrade: brew upgrade ios-deploy • CocoaPods version 1.2.0
There are four brew
commands in there to run. When I did them, this problem disappeared for me. Good luck!