gpt4 book ai didi

ios - 如何获取 Apple Watch 硬件标识符?

转载 作者:行者123 更新时间:2023-12-04 18:33:44 25 4
gpt4 key购买 nike

本页http://theiphonewiki.com/wiki/Models似乎暗示新苹果 watch 的标识符是“Watch 1,1”和“Watch 1,2”

有谁知道如何在连接 watch 的代码中获取此标识符?[WKInterfaceDevice currentDevice] 似乎只给我屏幕边界。

最佳答案

WatchKit 没有获取硬件标识符的方法。为了区分 38 毫米和 42 毫米 watch ,开发论坛中的一位 Apple 员工建议使用 WKInterfaceDevice 上的 screenBounds 属性。像这样:

if ([WKInterfaceDevice currentDevice].screenBounds.size.width == 136.0f) {
// 38mm
}
else {
// 42mm
}

关于ios - 如何获取 Apple Watch 硬件标识符?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29856632/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com