dongmaomou4117 2014-01-08 14:23
浏览 28
已采纳

如何在Apple中将Apple设备模型标识符转换为人类可读的文本? [关闭]

Is there a way to easily convert the identifiers obtained by uname to human readable text using PHP?

So I mean iPhone6,1 to iPhone 5S.

  • 写回答

1条回答 默认 最新

  • dras2334 2014-01-08 14:28
    关注

    Here is a function I use myself for converting these identifiers to device names:

    function identifierToString($model){
        $models = array(
    
            "i386"      => "Simulator",          //iPhone Simulator
            "x86_64"    => "Simulator",          //iPhone Simulator
    
            "iPhone1,1" => "iPhone 1G",          //iPhone 1G
            "iPhone1,2" => "iPhone 3G",          //iPhone 3G
            "iPhone2,1" => "iPhone 3GS",         //iPhone 3GS
    
            "iPhone3,1" => "iPhone 4",           //iPhone 4 - AT&T
            "iPhone3,2" => "iPhone 4",           //iPhone 4 - Other carrier
            "iPhone3,3" => "iPhone 4",           //iPhone 4 - Other carrier
            "iPhone4,1" => "iPhone 4S",          //iPhone 4S
    
            "iPhone5,1" => "iPhone 5",           //iPhone 5
            "iPhone5,2" => "iPhone 5",           //iPhone 5
            "iPhone5,3" => "iPhone 5C",          //iPhone 5C
            "iPhone5,4" => "iPhone 5C",          //iPhone 5C
            "iPhone6,1" => "iPhone 5S",          //iPhone 5S
            "iPhone6,2" => "iPhone 5S",          //iPhone 5S
            "iPhone7,2" => "iPhone 6",          //iPhone 6
    
            "iPod1,1"   => "iPod 1st Gen",       //iPod Touch 1G
            "iPod2,1"   => "iPod 2nd Gen",       //iPod Touch 2G
            "iPod3,1"   => "iPod 3rd Gen",       //iPod Touch 3G
            "iPod4,1"   => "iPod 4th Gen",       //iPod Touch 4G
            "iPod5,1"   => "iPod 5th Gen",       //iPod Touch 5G
    
            "iPad1,1"   => "iPad 1",             //iPad Wifi
    
            "iPad2,1"   => "iPad 2",             //iPad 2 WiFi
            "iPad2,2"   => "iPad 2 Cellular",    //iPad 2 GSM
            "iPad2,3"   => "iPad 2 Cellular",    //iPad 2 CDMA
            "iPad2,4"   => "iPad 2",             //iPad 2 WiFi (Rev a)
    
            "iPad3,1"   => "iPad 3",             //iPad 3 WiFi
            "iPad3,2"   => "iPad 3 Cellular",    //iPad 3 GSM+CDMA
            "iPad3,3"   => "iPad 3 Cellular",    //iPad 3 GSM
    
            "iPad3,4"   => "iPad 4",             //iPad 3 WiFi
            "iPad3,5"   => "iPad 4 Cellular",    //iPad 3 GSM
            "iPad3,6"   => "iPad 4 Cellular",    //iPad 3 GSM+CMMA
    
            "iPad4,1"   => "iPad Air",           //iPad Air WiFi
            "iPad4,2"   => "iPad Air Cellular",  //iPad Air Cellular
    
            "iPad2,5"   => "iPad Mini",
            "iPad2,6"   => "iPad Mini Cellular", // GSM
            "iPad2,7"   => "iPad Mini Cellular", // GSM+CDMA
    
            "iPad4,4"   => "iPad Mini Retina",
            "iPad4,5"   => "iPad Mini Retina Cellular",
    
        );
    
        if(isset($models[$model])){
            return $models[$model];
        } else {
            return $model;
        }
    
    }
    

    Source: http://theiphonewiki.com/wiki/Models

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 远程桌面文档内容复制粘贴,格式会变化
  • ¥15 关于#java#的问题:找一份能快速看完mooc视频的代码
  • ¥15 这种微信登录授权 谁可以做啊
  • ¥15 请问我该如何添加自己的数据去运行蚁群算法代码
  • ¥20 用HslCommunication 连接欧姆龙 plc有时会连接失败。报异常为“未知错误”
  • ¥15 网络设备配置与管理这个该怎么弄
  • ¥20 机器学习能否像多层线性模型一样处理嵌套数据
  • ¥20 西门子S7-Graph,S7-300,梯形图
  • ¥50 用易语言http 访问不了网页
  • ¥50 safari浏览器fetch提交数据后数据丢失问题