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