how to get current distance between iPhone and paired Apple Watch

夙愿已清 提交于 2020-01-03 10:10:12

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!