Development cannot be enabled while your drive is locked

When running my app on my device for debug, message is shown


===========

Development cannot be enabled while your drive is locked

Please unlock your device and reattach.

(0xE80000E2).

===========


<Env>

Xcode: Xcode 8 beta 2

iOS: iOS 10 beta 2


What's the problem? T.T

Accepted Reply

After updated next version of Xcode and iOS, it is resolved.


I don't know what is the reason.

Replies

Disconect your iPhone (device) from your Mac.

Your Mac is not a "Trusted" computer. On your iPhone (device) go to Setting > Reset > Reset Location & Privacy.


Then connect your device to your Mac and answer "Trust" to the prompt.


This should correct your problem. It did for mey

Post not yet marked as solved Up vote reply of OTR Down vote reply of OTR

After updated next version of Xcode and iOS, it is resolved.


I don't know what is the reason.

"After updated next version of Xcode and iOS, it is resolved."

It's now 2018, I'm running Xcode 9.2, with an iPhone running iOS 11.2, and this issue is still live and kicking.

My iPhone is unlocked, but XCode reports that "Development cannot be enabled while your device is locked."

Looking at the App Store, there are no Xcode updates available, so I'm stuck.


I'll say this for Apple, at least Xcode is consistantly dreadful.

When I try to test on the connected iPhone I have:

"Develpment cannot be enabled while your device is locked.

Please unlock your device and reattach.
(0xE80000E2)"


I updated iOs to the beta vesion 11.3 (15E5216a) and Xcode to version 9.3 beta 4 (9Q127n), which is the one declared to support iOS beta 11.3. So it should not be in the need of updating Xcode.

My iPhone, connected to the iMac, is backed-up to iTunes, so it seems to me that it is trusted.

How can be this case approcched?

The Xcode project was still configured for iOS 11.2.

Changed the configuration to reflect the real iOS version 11.3 resolved the problem.

I had the same problems but it was solved by unpair and pair the phone again.


In XCode click Product>>Destination>>Add Aditional Simulators...

On Devices Tab Right Click on your device and select Unpair Device


Then unplug and plug in your phone again. There will be a prompt to trust this computer on the phone.

Select Trust and the XCode and the phone will start paring again.


(If there's another version of the same app on your phone you may have to delete it first.)

thank you. after my device updated, i got the same code error.
however, thanks to your solution, i can solve this error.

Thank you!

Year 2019

Xcode 10.2.1 (10E1001)
iPhone running iOS 12.3.1

New app using Swift 5.0.1
Still happening...

This is happening in XCode 11 as well


XCode 11 seems a lot buggier than 10 when it comes to maintaining device connectivity.

November 2019

Xcode 11.2.1
iPhone running iOS 13.1.3

App compiled with Swift 5.1
Still happening...

Unexpectedly, it is worked on me, unpair and repair ....
Thank youuu for saving my day :-)

Xcode 12.01, iphone 8 IOS 14.01..
This problem STILL happens... 3 years later and apple haven't fixed it.!

Everything works, connects and debugs to the phone wirelessly.
But...if you begin debug while the iPhone screen is locked, xcode says the iphone is locked. Unlock the phone, xcode throws a fit and still says iphone is locked...

What a crock.
go into xcode->windows>devices and simulators... and it has removed my phone.. nice one!... time is precious..

June 2022. Still the same 50% of the time. The only way to get rid of it is restart everything. Mac, XCode and device. Shame.

August 2022. Same. Restarted everything and couldn't convince them to work together. Now I'll start fiddling with Xcode version IOS version combinations. FUN! Wrote off the day.

  • Resetting the network on my iPhone fixed it!

    Settings -> Transfer or Reset iPhone -> Reset -> Reset Network Settings

Add a Comment