Xcode “Device Locked” When iPhone is unlocked

前端 未结 30 2057
失恋的感觉
失恋的感觉 2021-01-29 18:53

When I tried to build and run, Xcode said my device was locked. I looked at my iPhone, and it\'s not locked at all. How do I fix this?

相关标签:
30条回答
  • 2021-01-29 19:45

    Generally just unplugging/replugging seems to work for me. But today it didn't and something else seems to have worked: I have enabled network debugging on the device in question and it almost looked like it remembered an old network "lock" setting, while not seeing that the device was actually connected via USB. After (temporarily) de-selecting "Connect via Network" and replugging, it got things working again.

    0 讨论(0)
  • 2021-01-29 19:46

    This issue is not about "Trust" or not. It's a bug in Xcode.

    Just follow these steps.

    When Xcode is running and your device is connected:

    1. Lock your device.
    2. Unplug your device from Mac.
    3. Unlock your device.
    4. Plug your device back to Mac.
    0 讨论(0)
  • 2021-01-29 19:47

    I ran in to the same issue even though i selected "Trust this computer" option first time.

    This worked for me

    1. Lock the device
    2. Remove cable from device.
    3. Unlock the device
    4. Connect again to Mac
    0 讨论(0)
  • 2021-01-29 19:47

    there are two solution worked for me. 1) disconnect your device from the mac and reattach it. 2) disconnect your device from the mac and restart it and then connect it with mac it'll work

    0 讨论(0)
  • 2021-01-29 19:51

    One possibility worth checking, if none of these other solutions work, is that there is no space left on the device. Xcode will not give you a helpful "device full" error to tell you that your device has no storage space left, but it will also not be able to deploy an app build to a device whose storage is full. The only solution in that situation is to delete media or other apps/data to free up enough space.

    0 讨论(0)
  • 2021-01-29 19:53

    From the Window Menu in top bar of Xcode, select Devices and Simulators.

    (or Press SHIFT + COMMAND + 2)

    Then select your device, right click and select Unpair.
    Once you do this Trust or Don't trust will appear on your device.
    Trust the device again and it will begin preparing it for Development.
    Wait for Xcode to pair device for development and then you are good to go!

    0 讨论(0)
提交回复
热议问题