RPC and API

Database met apparaatmodellen

De gebruikersinterface Instanties van de bijbehorende macOS-app koppelt Apple-model-ID's aan begrijpelijke namen (iPad16,6 -> "iPad Pro 13-inch (M4)", Mac16,6 -> "MacBook Pro (14-inch, 2024)"). DeviceModelCatalog gebruikt ook het voorvoegsel van de ID (met de apparaatfamilie als terugvaloptie) om per apparaat een SF Symbol te kiezen.

Bestanden in apps/macos/Sources/OpenClaw/Resources/DeviceModels/:

Bestand Doel
ios-device-identifiers.json Toewijzing van iOS-/iPadOS-ID aan naam
mac-device-identifiers.json Toewijzing van Mac-ID aan naam
NOTICE.md Vastgezette upstream-commit-SHA's
LICENSE.apple-device-identifiers.txt Upstream-MIT-licentie

Gegevensbron

Overgenomen uit de GitHub-repository kyle-seongwoo-jun/apple-device-identifiers, die onder de MIT-licentie valt. De JSON-bestanden zijn vastgezet op de commit-SHA's die in NOTICE.md zijn vastgelegd, zodat builds deterministisch blijven.

De database bijwerken

  1. Kies de upstream-commit-SHA's waarop u wilt vastzetten (één voor iOS en één voor macOS).
  2. Werk apps/macos/Sources/OpenClaw/Resources/DeviceModels/NOTICE.md bij met de nieuwe SHA's.
  3. Download de JSON-bestanden die op deze commits zijn vastgezet opnieuw:
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. Controleer of LICENSE.apple-device-identifiers.txt nog steeds overeenkomt met upstream; vervang het bestand als de upstream-licentie is gewijzigd.
  2. Controleer of de macOS-app zonder fouten wordt gebouwd:
bash
swift build --package-path apps/macos

Gerelateerd

Was this useful?
On this page

On this page