Development cannot be enabled while your device is locked.

问题:Development cannot be enabled while your device is locked.xcode


分析缘由:因为第一次链接MAC时,在iOS设备上点击了"不信任"选项,因此XCode 8不能访问手机,因此才出现这个问题app


解决方法:iphone

英文好的同窗,能够看到原文章spa

http://stackoverflow.com/questions/26791477/xcode-device-locked-when-iphone-is-unlocked
code


如下我说下方法orm

这是APPLE官网的解释ip

https://support.apple.com/en-us/HT202778
rem


重点是这段io

Change your settings for trusted computers

Your iOS device remembers the computers you've chosen to trust.form

If you don't want to trust a computer or other device anymore, change the privacy settings on your iPhone, iPad, or iPod touch: In iOS 8 or later, tap Settings > General > Reset > Reset Location & Privacy. Now when you connect to formerly trusted computers, the Trust alert will ask you whether you trust that computer. 

意思是说重置隐私设置

点击 设置 --> 通用 --> 重置  --> 重置位置和隐私 


而后关闭xcode 8, 拔掉数据线,重启xocde 8开启项目, 从新插上数据线,此时手机上会显示mac与手机设备的链接访问权限,选择“信任”,

大功告成了~~~