콘텐츠로 이동

Apple 기기 모델 데이터베이스 업데이트하기

앱을 개발하다 보면 iPad16,6이나 Mac16,6 같은 식별자를 마주칠 때가 있어요. 개발자에게는 익숙한 코드일지 몰라도, 사용자에게 이런 암호 같은 이름을 그대로 보여줄 수는 없죠.

사용자가 자신의 기기를 한눈에 알아볼 수 있도록 친숙한 이름을 보여주려면 별도의 매핑 데이터베이스가 필요해요. macOS companion app에서 이 데이터를 어떻게 최신 상태로 유지하는지 설명해 드릴게요.

  • kyle-seongwoo-jun/apple-device-identifiers 오픈소스 저장소 데이터
  • 프로젝트 내 apps/macos/Sources/OpenClaw/Resources/DeviceModels/ 경로 접근 권한

데이터베이스를 업데이트하는 과정은 간단해요. 다음 단계를 따라주세요.

  1. 고정할 upstream commit 해시를 선택하세요 (iOS용 하나, macOS용 하나).
  2. apps/macos/Sources/OpenClaw/Resources/DeviceModels/NOTICE.md 파일에 선택한 commit 해시를 업데이트하세요.
  3. 아래 명령어를 사용해 해당 commit 버전의 JSON 파일을 다시 다운로드하세요.
Terminal window
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. apps/macos/Sources/OpenClaw/Resources/DeviceModels/LICENSE.apple-device-identifiers.txt 내용이 upstream 라이선스와 일치하는지 확인하고, 변경되었다면 교체하세요.
  2. macOS 앱이 경고 없이 빌드되는지 확인하세요.
Terminal window
swift build --package-path apps/macos

빌드 경고가 발생하는 경우 데이터베이스 파일을 업데이트한 후에는 반드시 swift build 명령어를 실행해야 해요. 빌드 과정에서 경고 메시지가 나타나지 않는지 꼼꼼히 확인해 주세요.


도움이 필요하신가요? AI Setup Assistant에게 물어보세요.

OpenClaw

OpenClaw Expert

아직 막혀 있나요?

이 문서에서 답을 못 찾았다면 OpenClaw Expert에게 바로 물어보세요.