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?
Answer: A: No. That is if you are talking about locking and unlocking with the device passcode, there is no log for that.
Make Sure Wrist Detection is Enabled Wrist Detection has to be enabled for Unlock With Apple Watch to work. So head into the Watch app on your iPhone, and in the Watch tab, select Passcode and ensure the Wrist Detection switch is in the green ON position.
DeviceStatus.swift import Foundation class DeviceStatus : NSObject { func locked(){ print("device locked") // Handle Device Locked events here. } func unlocked(){ print("device unlocked") //Handle Device Unlocked events here. } }
My phone was set to "trust" the Mac, and I still ran into this error with Xcode 6.1.1.
This worked for me:
Did you by chance not "trust" the device? This will prevent it from communicating with xcode even if the device is unlocked.
Update here's a support doc from Apple: http://support.apple.com/en-us/HT5868
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With