Cơ sở dữ liệu mô hình thiết bị (tên thân thiện)
Ứng dụng đi kèm trên macOS hiển thị tên thiết bị Apple thân thiện trong giao diện Instances bằng cách ánh xạ mã định danh mô hình Apple (ví dụ: iPad16,6, Mac16,6) sang tên dễ đọc.
Ánh xạ này được lưu trữ dưới dạng JSON tại:
apps/macos/Sources/OpenClaw/Resources/DeviceModels/
Nguồn dữ liệu
Hiện tại, chúng tôi sử dụng ánh xạ từ kho MIT-licensed:
kyle-seongwoo-jun/apple-device-identifiers
Để đảm bảo các bản build ổn định, các tệp JSON được gắn với các commit cụ thể từ upstream (được ghi lại trong apps/macos/Sources/OpenClaw/Resources/DeviceModels/NOTICE.md).
Cập nhật cơ sở dữ liệu
- Chọn các commit từ upstream mà bạn muốn gắn (một cho iOS, một cho macOS).
- Cập nhật các hash commit trong
apps/macos/Sources/OpenClaw/Resources/DeviceModels/NOTICE.md.
- Tải lại các tệp JSON, gắn với các commit đó:
IOS_COMMIT="<commit sha cho ios-device-identifiers.json>"
MAC_COMMIT="<commit sha cho 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
- Đảm bảo
apps/macos/Sources/OpenClaw/Resources/DeviceModels/LICENSE.apple-device-identifiers.txt vẫn khớp với upstream (thay thế nếu giấy phép upstream thay đổi).
- Kiểm tra ứng dụng macOS build sạch sẽ (không có cảnh báo):
swift build --package-path apps/macos
Last modified on March 22, 2026