且构网

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

在 iOS 8 中检测 Apple Watch

更新时间:2023-12-04 16:26:16

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

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.