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