49

Error and warnigs in devices and simulators Issue :

Details

Failed _shouldMakeReadyForDevelopment check even though device is not locked by passcode.
Domain: com.apple.platform.iphoneos
Code: 5
Failure Reason: allowsSecureServices: 1. isConnected: 0. Platform: <DVTPlatform:0x7fecb76471f0:'com.apple.platform.iphoneos':<DVTFilePath:0x7fecb7647170:'/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform'>>. DTDKDeviceIdentifierIsIDID: 0
User Info: {
    DVTDeviceDescription = "\Ud83d\Udcf1<DVTiOSDevice (0x7fecb9844570), TakHyun\Uc758 iPhone, iPhone, 13.4.1 (17E262), 8d695f88c5c910974df39462a1815a52376a0fa9>";
}

screenshot of error message

TRY:

  1. Restart macbook and iphone
  2. Trust in Trust This Computer notification

Xcode Version 11.4.1 (11E503a) IPhone X ios 13.4.1

crusy
  • 1,424
  • 2
  • 25
  • 54
Jeff
  • 1,328
  • 1
  • 6
  • 9
  • 2
    same issue here - it is impossible to be productive with this level of flakiness! – amok May 04 '20 at 19:31
  • 1
    @amok I finally figure it out. if u have the same issue, check this https://stackoverflow.com/questions/61522527/xcode-device-issue-failed-shouldmakereadyfordevelopment-check-even-though-dev – Jeff May 06 '20 at 13:12
  • mostly it is due to the "do trust this" which requires a passphrase. As we developers work late at night as well, MAKE SURE the "Do not disturb" mode is NOT turned on on your phone. If it is: the "do trust" is not shown.... usually after having the pop up message back unpairing is just enough to make it work. – sp33c Oct 15 '20 at 19:00

12 Answers12

73

I finally figure it out

  1. Connect the iphone(cable not wifi)
  2. Unpair device and quit the xcode
  3. Reconnect the iphone and Trust this computer accept Done. If you cant fix it, go to apple dev site reedit the device and do it again 1~3

check this photos enter image description here

enter image description here

Jeff
  • 1,328
  • 1
  • 6
  • 9
  • 2
    This was the only thing that worked for me. I tried rebooting the device, relaunching Xcode, rebooting mac. Only unpairing and re-pairing the device worked for me. Thanks! – Roger Oba May 29 '20 at 00:27
  • Repairing worked for me, although the warnings in the device window are still present. – emmics Jun 18 '20 at 08:58
  • 1
    How is this window accessed? Where is it? – mediaguru Jun 25 '20 at 14:06
  • 3
    @mediaguru The Devices window is accessed by clicking Window > Devices and Simulators. – Stout Joe Jul 09 '20 at 20:04
  • This happened to me after I upgraded my phone by backing up one phone and restoring that to a later phone. – William Entriken Aug 28 '20 at 19:08
  • This helped me but the instructions are a little ambiguous, you say connect, unpair then connect. If you clarify exactly what you mean it would be more helpful – Stokedout Sep 17 '20 at 17:32
  • Have done this several times, I still get the "Failed to prepare device for development" and related error messages, but it does finally debug in Visual Studio Comunity 2019 for Windows once I updated to the latest official on Windows and MacBook Pro, unpaired and repaired, and deleted/reinstalled application through VS2019. – John Ernest Dec 15 '20 at 01:14
5

I started getting the OP's error after updating my iPhone to iOS 13.5.1. Here is what worked for me to resolve the issue:

  1. Unpair the iPhone (as per answer from @Jeff above).
  2. Upgrade Xcode to latest, in my case 11.5 (which I believe is the first version of Xcode to support building to iOS 13.5.
  3. NEW: I launched Xcode after updating to 13.5 which prompted me to "Install additional required components" which I did. Xcode extra step after updating
  4. Reconnect/pair iPhone in Xcode's Devices window and Trust the computer.
  5. NEW: After pairing the iPhone make sure you check the "Connect via Network" checkbox for the newly paired iPhone. By default Connect via Network is unchecked. Important step after re-pairing device

The "NEW" steps are not steps I've seen in previous answers, so I posted this answer.

Community
  • 1
  • 1
Richard
  • 51
  • 3
3

Or Xcode is just not smart enough to know that your iPhone iOS version is newer than the one supported by Xcode! I had this issue, been trying all solutions until I updated my Xcode from 11.4 to 11.5

raed
  • 4,887
  • 4
  • 30
  • 49
3

So this started for me after I updated Xcode to version 12, and my iPhone to iOS 14. The fix was as listed above (multiple times) to unpair, reconnect, and trust the computer, BUT only after changing the target to iOS 13 in Xcode did those steps actually work. Once it was reconnected I was able to switch the target back to iOS 14 inside Xcode. This one was frustrating.

Scooter
  • 4,068
  • 4
  • 32
  • 47
  • 2
    For me, Xcode 12, iOS 14, this was fixed just by unpairing, unplugging device, then plugging cable again. So, simple restart. Project remained on iOS 10 minimum deployment target. – Martin Berger Oct 07 '20 at 09:26
  • Thanks Martin! I suspect it has to do with having the target set to iOS 14 too. Since yours was already set to iOS 10 maybe that is why you had success right away. – Scooter Oct 26 '20 at 23:50
  • That fixed it for me. I used to had deployment target at 10.0 and changed it to 13.0 now. after that the command **flutter build ios** works – stan Oct 28 '20 at 19:00
2

In my case, I was using an USB to USB-C adapter which apparently my laptop did not appreciate. Switched to a usb-c lightning cable and poof - everything just works. Now I'm mad that I already reset my network settings!

2

I had issues with Xcode 11.5 and iOS 13.5.1

Sucessful:

  • Remove the Logitech Wireless Mouse USB Receiver that was plugged into the USB-C to USB converter (I use this converter to connect both the Wireless mouse AND my iPhone via USB to Lightning cable). This REPRODUCABLY caused the described error "Failed _shouldMakeReadyForDevelopment check even though device is not locked" to reappear when I repeated the re-pairing procedure with the Logitech adaptor plugged in

Not successful:

  • Unpairing (from both Macbook or iOS - Settings - Developers - Unpair)
  • unplug, Repkug the USB Connector
  • Connect via Network setting
  • Restart iPhone, MacBook, ...
Joachim
  • 21
  • 2
1

I had some success turning Bluetooth off and on again on the phone. Still, the watch often disappears.

pipacs
  • 1,049
  • 11
  • 25
1

None of the above worked for me. With iOS 14.0.1 and XCode 12.0.1. I suspected it is an Apple bug with wireless communication to-from the device. Since my iPhone can be used as a hot spot for my Mac, I found that once I used my iPhone as a hotspot from my Mac, XCode was able to upload the App binary to my iPhone and debug.

So I'd say if nothing else works then try to use your iPhone as a hotspot for your Mac, and then you should be able to wirelessly debug.

0

For me it was the exaxt opposite of the message. Xcode was up to date, but the iphone I was trying to run on was not updated to the latest version of iOS. 13.7 was the version at this time.

After updating to 13.7 the iPhone, everything went back to normal.

gabrielstuff
  • 1,286
  • 1
  • 13
  • 16
0

I rebooted my iPad, and it eventually worked...

geekyaleks
  • 1,281
  • 3
  • 18
  • 29
0

My problem was building the application with a production provisioning profile. in my case, the solution was to switch to the development provisioning profile. Then it worked :)

0

Mine got resolved when I updated the Xcode from 12.2 to 12.3 Beta.

My iPadOS version is 14.2.

Even though XCode 12.2 supports OS 14.2, I faced the same issue. It is the XCode bug.

Devanshi Modha
  • 359
  • 5
  • 8