问题
is there any way to get distance between apple watch and paired iPhone. I am working on a test case in which .. iPhone and Apple Watch should be notified when distance between both devices got change.
回答1:
You technically can't get the exact distance, but you can make one device act as a beacon and work on their Core Location proximity. You have up to three proximity states on which you can check the distance: CLProximityImmediate
(i.e. the device are very close to each other), CLProximityNear
(i.e. the devices are close to each other) and CLProximityFar
(i.e. the devices are about to lose Bluetooth connection).
来源:https://stackoverflow.com/questions/31563937/how-to-get-current-distance-between-iphone-and-paired-apple-watch