JSON files for mapping iOS, iPadOS, tvOS, watchOS, visionOS and macOS device identifiers to some human readable equivalent.
You can download JSON files from the repository.
curl https://raw.githubusercontent.com/kyle-seongwoo-jun/apple-device-identifiers/main/ios-device-identifiers.json > ios-device-identifiers.jsonHere is a simple example using the JSON file with bash and jq.
function get_apple_device_name() {
local URL="https://raw.githubusercontent.com/kyle-seongwoo-jun/apple-device-identifiers/main"
local OS="$1" # ios, tvos, watchos, visionos, mac
local IDENTIFIER="$2"
curl "$URL/$OS-device-identifiers.json" | jq -r ".[\"$IDENTIFIER\"]"
}
$ get_apple_device_name ios iPhone16,1
iPhone 15 Pro
$ get_apple_device_name mac Mac15,11
MacBook Pro (16-inch, Nov 2023)# iOS, iPadOS, tvOS, watchOS, visionOS
deno run start:scrape-from-xcode
# macOS (OpenAI is optional, it needs to generate `mac-device-identifiers-unique.json`)
OPENAI_API_KEY=... \
OPENAI_MODEL=... \
deno run start:scrape-from-apple