Last active
April 8, 2016 21:17
-
-
Save kamermans/698af6d22d1fc539a249265a41634bdc to your computer and use it in GitHub Desktop.
Parse iOS model names into mapping file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"AppleTV2,1": "Apple TV 2G", | |
"AppleTV3,1": "Apple TV 3", | |
"AppleTV3,2": "Apple TV 3 (2013)", | |
"AppleTV5,3": "Apple TV 4 (2015)", | |
"iPad1,1": "iPad 1", | |
"iPad2,1": "iPad 2 (WiFi)", | |
"iPad2,2": "iPad 2 (GSM)", | |
"iPad2,3": "iPad 2 (CDMA)", | |
"iPad2,4": "iPad 2 (Mid 2012)", | |
"iPad2,5": "iPad Mini (WiFi)", | |
"iPad2,6": "iPad Mini (GSM)", | |
"iPad2,7": "iPad Mini (Global)", | |
"iPad3,1": "iPad 3 (WiFi)", | |
"iPad3,2": "iPad 3 (CDMA)", | |
"iPad3,3": "iPad 3 (GSM)", | |
"iPad3,4": "iPad 4 (WiFi)", | |
"iPad3,5": "iPad 4 (GSM)", | |
"iPad3,6": "iPad 4 (Global)", | |
"iPad4,1": "iPad Air (WiFi)", | |
"iPad4,2": "iPad Air (Cellular)", | |
"iPad4,3": "iPad Air (China)", | |
"iPad4,4": "iPad Mini 2 (WiFi)", | |
"iPad4,5": "iPad Mini 2 (Cellular)", | |
"iPad4,6": "iPad Mini 2 (China)", | |
"iPad4,7": "iPad Mini 3 (WiFi)", | |
"iPad4,8": "iPad Mini 3 (Cellular)", | |
"iPad4,9": "iPad Mini 3 (China)", | |
"iPad5,1": "iPad Mini 4 (WiFi)", | |
"iPad5,2": "iPad Mini 4 (Cellular)", | |
"iPad5,3": "iPad Air 2 (WiFi)", | |
"iPad5,4": "iPad Air 2 (Cellular)", | |
"iPad6,3": "iPad Pro 9.7-inch (WiFi)", | |
"iPad6,4": "iPad Pro 9.7-inch (Cellular)", | |
"iPad6,7": "iPad Pro 12.9-inch (WiFi)", | |
"iPad6,8": "iPad Pro 12.9-inch (Cellular)", | |
"iPhone1,1": "iPhone 2G", | |
"iPhone1,2": "iPhone 3G", | |
"iPhone2,1": "iPhone 3G[S]", | |
"iPhone3,1": "iPhone 4 (GSM)", | |
"iPhone3,2": "iPhone 4 (GSM / 2012)", | |
"iPhone3,3": "iPhone 4 (CDMA)", | |
"iPhone4,1": "iPhone 4[S]", | |
"iPhone5,1": "iPhone 5 (GSM)", | |
"iPhone5,2": "iPhone 5 (Global)", | |
"iPhone5,3": "iPhone 5c (GSM)", | |
"iPhone5,4": "iPhone 5c (Global)", | |
"iPhone6,1": "iPhone 5s (GSM)", | |
"iPhone6,2": "iPhone 5s (Global)", | |
"iPhone7,1": "iPhone 6+", | |
"iPhone7,2": "iPhone 6", | |
"iPhone8,1": "iPhone 6s", | |
"iPhone8,2": "iPhone 6s+", | |
"iPhone8,4": "iPhone SE", | |
"iPod1,1": "iPod touch 1G", | |
"iPod2,1": "iPod touch 2G", | |
"iPod3,1": "iPod touch 3", | |
"iPod4,1": "iPod touch 4", | |
"iPod5,1": "iPod touch 5", | |
"iPod7,1": "iPod touch 6" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Run this code while at this site: | |
// https://ipsw.me/all | |
var links = document.getElementsByTagName("a"); | |
var devs = {}; | |
for (i in links) { | |
var link = links[i]; | |
if (link.href == undefined || !link.href.match(/#(iPad|iPod|iPhone|AppleTV)/)) continue; | |
var devname = link.href.split("#")[1]; | |
devname = devname.replace(/(\d)$/, ",$1"); | |
devs[devname] = link.innerHTML; | |
} | |
console.log(JSON.stringify(devs, null, " ")); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment