読者です 読者をやめる 読者になる 読者になる

ぽちぽち歩くと下に落ちてる物に気がつくよね

思いついたことを書き留めておく場所なのです。意味はあまりないんじゃないかな

そういや最近の機種はなんじゃろ

ということで調べてみる

+ (NSString *) hwMachine{
    size_t size;
    sysctlbyname("hw.machine", NULL, &size, NULL, 0);
    char *machine = malloc(size);
    sysctlbyname("hw.machine", machine, &size, NULL, 0);
    NSString *platform = [NSString stringWithCString:machine
           encoding:NSUTF8StringEncoding];
    free(machine);
    return platform;
}

こんなのを書いて戻り値調べる。(まぁコピペばっかりですけどw

"i386","Simulator"
"x86_64","Simulator"

"iPhone1,1","iPhone 1G"
"iPhone1,2","iPhone 3G"
"iPhone2,1","iPhone 3GS"
"iPhone3,1","iPhone 4 (GSM)"
"iPhone3,2","iPhone 4 (Other Carrier)"
"iPhone3,3","iPhone 4 (CDMA)"
"iPhone4,1","iPhone 4S"
"iPhone5,1","iPhone 5"

"iPod1,1","iPod Touch 1G"
"iPod2,1","iPod Touch 2G"
"iPod3,1","iPod Touch 3G"
"iPod4,1","iPod Touch 4G"
"iPod5,1","iPod Touch 5G"

"iPad1,1","iPad (WiFi)"
"iPad1,2","iPad (3G)"
"iPad2,1","iPad2 (WiFi)"
"iPad2,2","iPad2 (GSM)"
"iPad2,3","iPad2 (CDMA)"
"iPad2,4","iPad2 (WiFi RevA)"
"iPad2,5","iPad mini (WiFi)"
"iPad2,6","iPad mini (Cellular ATT)"
"iPad2,7","iPad mini (Cellular Verizon)"
"iPad3,1","iPad3G (WiFi)"
"iPad3,2","iPad3G (Cellular ATT)"
"iPad3,3","iPad3G (Cellular Verizon)"
"iPad3,4","iPad4G (WiFi)"
"iPad3,5","iPad4G (Cellular ATT)"
"iPad3,6","iPad4G (Cellular Verizon)"

なるほ。iPad miniは iPad2からの派生。というのも判るわけですな。

でもってiPad (4th)は(3rd)の修正editionという。hmhm

ま、たまにはこんな技術話もw