如何获得Apple Watch硬件标识符?
这个页面http://theiphonewiki.com/wiki/Models似乎build议新的苹果手表的标识符是“Watch 1,1”和“Watch 1,2”
有谁知道如何获得这个标识符在一个连接手表的代码? [WKInterfaceDevice currentDevice]
似乎只给我屏幕界限。
没有WatchKit方法来获取硬件标识符。 为了区分38mm和42mm手表,开发者论坛的苹果员工build议在WKInterfaceDevice
上使用screenBounds
属性。 像这样的东西:
if ([WKInterfaceDevice currentDevice].screenBounds.size.width == 136.0f) { // 38mm } else { // 42mm }
- 将文本从iOS标签传递到WatchOS标签 – swift-
- WatchOS 2(testing版5):watchAppInstalled返回false
- 当试图在实际的Apple Watch上构build和运行WatchKit扩展时,如何避免“Error Launching”AppName“WatchKit Extension”错误?
- WatchKit应用程序的部署目标必须等于iOS 8.2(8.3)?
- WatchKit应用程序将不会编译:“错误:WatchKit扩展不包含任何WatchKit应用程序”
- 如何自动设置Watchkit应用程序目标的版本和内部版本号
- 在WatchOS2中使用WatchConnectivity在iOS和WatchOS之间发送消息
- WatchKit在handleWatchKitExtensionRequest块中返回reply():
- iOS7和Apple Watch