RPC and API

デバイスモデルデータベース

macOSコンパニオンアプリのインスタンスUIでは、Appleのモデル識別子をわかりやすい名前に対応付けます(iPad16,6 -> 「iPad Pro 13インチ(M4)」、Mac16,6 -> 「MacBook Pro(14インチ、2024)」)。DeviceModelCatalogは、デバイスごとのSF Symbolを選択する際にも識別子のプレフィックスを使用し、該当しない場合はデバイスファミリーにフォールバックします。

apps/macos/Sources/OpenClaw/Resources/DeviceModels/内のファイル:

ファイル 用途
ios-device-identifiers.json iOS/iPadOS識別子 -> 名前の対応付け
mac-device-identifiers.json Mac識別子 -> 名前の対応付け
NOTICE.md 固定された上流コミットSHA
LICENSE.apple-device-identifiers.txt 上流のMITライセンス

データソース

MITライセンスのGitHubリポジトリkyle-seongwoo-jun/apple-device-identifiersからベンダー化しています。ビルドの再現性を確保するため、JSONファイルはNOTICE.mdに記録されたコミットSHAに固定されています。

データベースの更新

  1. 固定する上流コミットSHAを選択します(iOS用とmacOS用に1つずつ)。
  2. apps/macos/Sources/OpenClaw/Resources/DeviceModels/NOTICE.mdを新しいSHAで更新します。
  3. それらのコミットに固定されたJSONファイルを再ダウンロードします。
bash
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. LICENSE.apple-device-identifiers.txtが引き続き上流と一致していることを確認します。上流のライセンスが変更されている場合は置き換えます。
  2. macOSアプリが問題なくビルドされることを確認します。
bash
swift build --package-path apps/macos

関連項目

Was this useful?
On this page

On this page