“Could not connect to lockdownd” while attempting to run flutter app

后端 未结 3 1565
离开以前
离开以前 2021-01-06 05:19

I am following the Get Started tutorial.

I can install everything, flutter doctor returns all checkmarks but in the end there is a message:

相关标签:
3条回答
  • 2021-01-06 05:23

    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.

    0 讨论(0)
  • 2021-01-06 05:30

    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!

    0 讨论(0)
  • 2021-01-06 05:47

    Disconnect all iOS devices, then:

    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/*
    

    Connect an iOS device, and choose "Trust" when prompted, after that:

    sudo chmod -R 777 /var/db/lockdown/
    
    0 讨论(0)
提交回复
热议问题