设备型号数据库
设备型号数据库(友好名称)
macOS companion 应用在 Instances UI 中通过将 Apple 型号标识符(例如 iPad16,6、Mac16,6)映射到人类可读的名称来显示友好的 Apple 设备型号名称。
该映射作为 JSON vendored 在以下位置:
apps/macos/Sources/OpenClaw/Resources/DeviceModels/
数据来源
我们目前从 MIT 许可的仓库 vendored 该映射:
kyle-seongwoo-jun/apple-device-identifiers
为了保持构建的确定性,JSON 文件被固定到特定的上游提交(记录在 apps/macos/Sources/OpenClaw/Resources/DeviceModels/NOTICE.md 中)。
更新数据库
- 选择要固定到的上游提交(iOS 一个,macOS 一个)。
- 在
apps/macos/Sources/OpenClaw/Resources/DeviceModels/NOTICE.md中更新提交哈希。 - 重新下载 JSON 文件,固定到这些提交:
IOS_COMMIT="<ios-device-identifiers.json 的提交 sha>"
MAC_COMMIT="<mac-device-identifiers.json 的提交 sha>"
curl -fsSL "https://raw.githubusercontent.com/kyle-seongwoo-jun/apple-device-identifiers/${IOS_COMMIT}/ios-device-identifiers.json" \
-o apps/macos/Sources/OpenClaw/Resources/DeviceModels/ios-device-identifiers.json
curl -fsSL "https://raw.githubusercontent.com/kyle-seongwoo-jun/apple-device-identifiers/${MAC_COMMIT}/mac-device-identifiers.json" \
-o apps/macos/Sources/OpenClaw/Resources/DeviceModels/mac-device-identifiers.json
- 确保
apps/macos/Sources/OpenClaw/Resources/DeviceModels/LICENSE.apple-device-identifiers.txt仍然与上游匹配(如果上游许可发生变化则替换它)。 - 验证 macOS 应用构建干净(无警告):
swift build --package-path apps/macos