裝置型號資料庫(友善名稱)
macOS 伴侶應用在實例 UI 中顯示友善的 Apple 裝置型號名稱,透過將 Apple 型號識別碼(如 iPad16,6、Mac16,6)對應至人類可讀的名稱。
對應資料以 JSON 形式內建於:
apps/macos/Sources/OpenClaw/Resources/DeviceModels/
資料來源
我們目前內建來自 MIT 授權的 repository 的對應:
kyle-seongwoo-jun/apple-device-identifiers
為保持建構的確定性,JSON 檔案釘選至特定上游 commit(記錄在 apps/macos/Sources/OpenClaw/Resources/DeviceModels/NOTICE.md)。
更新資料庫
- 選擇要釘選的上游 commit(iOS 和 macOS 各一個)。
- 在
apps/macos/Sources/OpenClaw/Resources/DeviceModels/NOTICE.md中更新 commit hash。 - 重新下載 JSON 檔案,釘選至那些 commit:
IOS_COMMIT="<commit sha for ios-device-identifiers.json>"
MAC_COMMIT="<commit sha for mac-device-identifiers.json>"
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