裝置型號資料庫(友善名稱)

macOS 伴侶應用在實例 UI 中顯示友善的 Apple 裝置型號名稱,透過將 Apple 型號識別碼(如 iPad16,6Mac16,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)。

更新資料庫

  1. 選擇要釘選的上游 commit(iOS 和 macOS 各一個)。
  2. apps/macos/Sources/OpenClaw/Resources/DeviceModels/NOTICE.md 中更新 commit hash。
  3. 重新下載 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
  1. 確保 apps/macos/Sources/OpenClaw/Resources/DeviceModels/LICENSE.apple-device-identifiers.txt 仍匹配上游(若上游授權條款變更則替換)。
  2. 確認 macOS 應用建構正常(無警告):
swift build --package-path apps/macos