Skip to content

JSON files for mapping iOS, iPadOS, tvOS, watchOS, visionOS and macOS device identifiers to some human readable equivalent.

License

Notifications You must be signed in to change notification settings

kyle-seongwoo-jun/apple-device-identifiers

Repository files navigation

apple-device-identifiers

JSON files for mapping iOS, iPadOS, tvOS, watchOS, visionOS and macOS device identifiers to some human readable equivalent.

Usage

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)

Genrerate JSON file

# 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

References (iOS, iPadOS, tvOS, watchOS)

Sources (macOS)

About

JSON files for mapping iOS, iPadOS, tvOS, watchOS, visionOS and macOS device identifiers to some human readable equivalent.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published