在xcode中安装应用时显示 the divice is locked，网上攻略找到答案：
As is mentioned in several answers, the device is locked message is actually referring to the device not trusting the MacBook. In my case, I think my phone defaulted to not trusting my computer after updating to iOS 10. Here are the steps that worked for me to reset the settings (this is the same process that is mentioned in the Apple support page in tehprofessors’ answer):
- Disconnect your device from your MacBook
- On your device go to Settings > General > Reset, then tap Reset Location & Privacy
- Plug your device back into your computer, and on the device you will be prompted to trust the computer. Tap trust.
- Rebuild in XCode and the device locked error should disappear.