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.json
Here 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 --allow-run --allow-read --allow-write scripts/scrape-from-xcode.ts
# macOS
deno run --allow-net --allow-write scripts/scrape-from-apple.ts
deno run --allow-read --allow-write scripts/migrate-json.ts