且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在iOS 8中检测Apple Watch

更新时间:2023-12-04 16:13:28

***的做法是,在首次运行Watch应用程序时,在共享NSUserDefaults中将BOOL设置为true,然后在iOS应用程序中检查该值.开发人员论坛上和公开场合的所有迹象都表明,无法以编程方式知道手表是否已配对.

The best you an do is set a BOOL to true in shared NSUserDefaults the first time the Watch app is run and then check for that value in your iOS app. All indications on the dev forums and publicly have been that there isn't a way to programatically know if a Watch has been paired.