Enhedsmodel-database (brugervenlige navne)¶
Appen macOS følgesvend viser venlige Apple-enhedsnavne i Instans UI ved at kortlægge Apple-model-identifikatorer (f.eks. iPad16,6, Mac16,6) til læsbare navne.
Mappingen medleveres som JSON under:
apps/macos/Sources/OpenClaw/Resources/DeviceModels/
Datakilde¶
Vi medleverer i øjeblikket mappingen fra det MIT-licenserede repository:
kyle-seongwoo-jun/apple-device-identifiers
For at holde builds deterministiske er JSON-filerne fastlåst til specifikke upstream-commits (registreret i apps/macos/Sources/OpenClaw/Resources/DeviceModels/NOTICE.md).
Opdatering af databasen¶
- Vælg de upstream-commits, du vil fastlåse til (én for iOS, én for macOS).
- Opdater commit-hashene i
apps/macos/Sources/OpenClaw/Resources/DeviceModels/NOTICE.md. - Download JSON-filerne igen, fastlåst til disse commits:
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
- Sørg for, at
apps/macos/Sources/OpenClaw/Resources/DeviceModels/LICENSE.apple-device-identifiers.txtstadig matcher upstream (udskift den, hvis upstream-licensen ændrer sig). - Verificér, at macOS-appen bygger uden fejl (ingen advarsler):
swift build --package-path apps/macos