RPC and API

Apparaatmodeldatabase

De Instances-interface van de macOS-begeleidende app koppelt Apple-modelidentificaties aan herkenbare namen (iPad16,6 -> "iPad Pro 13-inch (M4)", Mac16,6 -> "MacBook Pro (14-inch, 2024)"). DeviceModelCatalog gebruikt ook het identificatievoorvoegsel (met het apparaatstype als terugvaloptie) om per apparaat een SF Symbol te kiezen.

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

Bestand Doel
ios-device-identifiers.json iOS/iPadOS-identificatie -> naamtoewijzing
mac-device-identifiers.json Mac-identificatie -> naamtoewijzing
NOTICE.md Vastgezette upstream-commit-SHA's
LICENSE.apple-device-identifiers.txt Upstream-MIT-licentie

Gegevensbron

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

De database bijwerken

  1. Kies de upstream-commit-SHA's om vast te zetten (éé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 aan deze commits zijn gekoppeld 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