RPC and API
база даних моделей пристроїв
Супутній застосунок macOS показує дружні назви моделей пристроїв Apple в UI Instances, зіставляючи ідентифікатори моделей Apple (наприклад, iPad16,6, Mac16,6) з людиночитаними назвами.
Зіставлення вендориться як JSON у:
apps/macos/Sources/OpenClaw/Resources/DeviceModels/
Джерело даних
Наразі ми вендоримо зіставлення з репозиторію під ліцензією MIT:
kyle-seongwoo-jun/apple-device-identifiers
Щоб забезпечити детермінованість збірок, JSON-файли прив’язані до конкретних комітів upstream (записаних у apps/macos/Sources/OpenClaw/Resources/DeviceModels/NOTICE.md).
Оновлення бази даних
- Виберіть коміти upstream, до яких хочете прив’язатися (один для iOS, один для macOS).
- Оновіть hash комітів у
apps/macos/Sources/OpenClaw/Resources/DeviceModels/NOTICE.md. - Повторно завантажте 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.json
- Переконайтеся, що
apps/macos/Sources/OpenClaw/Resources/DeviceModels/LICENSE.apple-device-identifiers.txtусе ще відповідає upstream (замініть його, якщо upstream-ліцензія зміниться). - Перевірте, що застосунок macOS збирається без попереджень:
swift build --package-path apps/macos