美文网首页
iOS 设备编号和手机型号间的映射

iOS 设备编号和手机型号间的映射

作者: 乐活北京 | 来源:发表于2019-10-16 20:07 被阅读0次

    关键字

    iOS 设备映射 iOS 设备名称

    缘起:

    端上自动化的时候,需要获取到手机相关的信息, 而通过deviceinfo -u命令给到的信息并不太适合人类阅读。

    image.png
    为了转化成人类更易读的语言,需要在这两种标识之间转化一下。

    映射表

    DEVICE_TYPE_TABLE = {
            "iPhone5,1": "iPhone 5 (GSM)",
            "iPhone5,2": "iPhone 5 (GSM+CDMA)",
            "iPhone5,3": "iPhone 5C (GSM)",
            "iPhone5,4": "iPhone 5C (Global)",
            "iPhone6,1": "iPhone 5S (GSM)",
            "iPhone6,2": "iPhone 5S (Global)",
            "iPhone7,1": "iPhone 6 Plus",
            "iPhone7,2": "iPhone 6",
            "iPhone8,1": "iPhone 6s",
            "iPhone8,2": "iPhone 6s Plus",
            "iPhone8,3": "iPhone SE (GSM+CDMA)",
            "iPhone8,4": "iPhone SE (GSM)",
            "iPhone9,1": "iPhone 7",
            "iPhone9,2": "iPhone 7 Plus",
            "iPhone9,3": "iPhone 7",
            "iPhone9,4": "iPhone 7 Plus",
            "iPhone10,1": "iPhone 8",
            "iPhone10,2": "iPhone 8 Plus",
            "iPhone10,3": "iPhone X Global",
            "iPhone10,4": "iPhone 8",
            "iPhone10,5": "iPhone 8 Plus",
            "iPhone10,6": "iPhone X GSM",
            "iPhone11,2": "iPhone XS",
            "iPhone11,4": "iPhone XS Max",
            "iPhone11,6": "iPhone XS Max Global",
            "iPhone11,8": "iPhone XR",
            "iPhone12,1": "iPhone 11",
            "iPhone12,3": "iPhone 11 Pro",
            "iPhone12,5": "iPhone 11 Pro Max",
            "iPhone12,8" : "iPhone SE 2nd Gen",
            "iPhone13,1" : "iPhone 12 Mini",
            "iPhone13,2" : "iPhone 12",
            "iPhone13,3" : "iPhone 12 Pro",
            "iPhone13,4" : "iPhone 12 Pro Max"
        }
    

    github 上比较全的映射关系

    传送门

    相关文章

      网友评论

          本文标题:iOS 设备编号和手机型号间的映射

          本文链接:https://www.haomeiwen.com/subject/ndtpmctx.html