Langsung ke konten utama

Database model perangkat (nama ramah)

Aplikasi pendamping macOS menampilkan nama model perangkat Apple yang ramah di UI Instances dengan memetakan pengidentifikasi model Apple (misalnya iPad16,6, Mac16,6) ke nama yang dapat dibaca manusia. Pemetaan ini di-vendor sebagai JSON di bawah:
  • apps/macos/Sources/OpenClaw/Resources/DeviceModels/

Sumber data

Saat ini kami mem-vendor pemetaan dari repositori berlisensi MIT:
  • kyle-seongwoo-jun/apple-device-identifiers
Untuk menjaga build tetap deterministik, file JSON dipatok ke commit upstream tertentu (dicatat di apps/macos/Sources/OpenClaw/Resources/DeviceModels/NOTICE.md).

Memperbarui database

  1. Pilih commit upstream yang ingin Anda patok (satu untuk iOS, satu untuk macOS).
  2. Perbarui hash commit di apps/macos/Sources/OpenClaw/Resources/DeviceModels/NOTICE.md.
  3. Unduh ulang file JSON, dipatok ke commit tersebut:
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. Pastikan apps/macos/Sources/OpenClaw/Resources/DeviceModels/LICENSE.apple-device-identifiers.txt masih sesuai dengan upstream (ganti jika lisensi upstream berubah).
  2. Verifikasi aplikasi macOS ter-build dengan bersih (tanpa peringatan):
swift build --package-path apps/macos