デバイスモデルデータベース
OpenClaw が macOS アプリで Apple デバイスモデル識別子にフレンドリな名前を提供する方法。
macOS コンパニオンアプリは、Apple モデル識別子(例:iPad16,6、Mac16,6)を人間が読める名前にマッピングすることで、インスタンス UI にフレンドリな Apple デバイスモデル名前を表示します。
マッピングは以下の場所に JSON としてベンダーされています:
- apps/macos/Sources/OpenClaw/Resources/DeviceModels/
データソース
現在、MIT ライセンスのリポジトリからマッピングをベンダーしています:
- kyle-seongwoo-jun/apple-device-identifiers
ビルドを決定論的に保つために、JSON ファイルは特定の上流コミットに固定されています(apps/macos/Sources/OpenClaw/Resources/DeviceModels/NOTICE.md に記録されています)。
データベースの更新
1. 固定したい上流コミットを選択します(iOS 用に 1 つ、macOS 用に 1 つ)。
2. apps/macos/Sources/OpenClaw/Resources/DeviceModels/NOTICE.md のコミットハッシュを更新します。
3. それらのコミットに固定された 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.json4. apps/macos/Sources/OpenClaw/Resources/DeviceModels/LICENSE.apple-device-identifiers.txt が上流と一致していることを確認します(上流のライセンスが変更された場合は置換します)。
5. macOS アプリがクリーンにビルドされることを確認します(警告なし):
swift build --package-path apps/macos