背景

分析崩溃

第一步、符号化崩溃日志

第二步、获取单个崩溃日志的各项信息

INTERNAL_NAME = {
    # iPhone 映射关系
    "iPhone1,1": "iPhone",
    "iPhone1,2": "iPhone 3G",
    "iPhone2,1": "iPhone 3GS",
    "iPhone3,1": "iPhone 4",
    "iPhone3,2": "iPhone 4",
    "iPhone3,3": "iPhone 4",
    "iPhone4,1": "iPhone 4S",
    "iPhone5,1": "iPhone 5",
    "iPhone5,2": "iPhone 5",
    "iPhone5,3": "iPhone 5c",
    "iPhone5,4": "iPhone 5c",
    "iPhone6,1": "iPhone 5s",
    "iPhone6,2": "iPhone 5s",
    "iPhone7,2": "iPhone 6",
    "iPhone7,1": "iPhone 6 Plus", 
    "iPhone8,1": "iPhone 6s", 
    "iPhone8,2": "iPhone 6s Plus", 
    # iPad 映射关系
    "iPad1,1": "iPad",
    "iPad2,1": "iPad 2",
    "iPad2,2": "iPad 2",
    "iPad2,3": "iPad 2",
    "iPad2,4": "iPad 2",
    "iPad3,1": "iPad 3",
    "iPad3,2": "iPad 3",
    "iPad3,3": "iPad 3",
    "iPad3,4": "iPad 4",
    "iPad3,5": "iPad 4",
    "iPad3,6": "iPad 4",
    "iPad4,1": "iPad Air",
    "iPad4,2": "iPad Air",
    "iPad4,3": "iPad Air",
    "iPad5,3": "iPad Air 2",
    "iPad5,4": "iPad Air 2",
    "iPad6,7": "iPad Pro",
    "iPad6,8": "iPad Pro"
}
crash_info["app_version"] = re.search(r"Version:(.+)", c_content).group(1).strip()

第三步、根据上述获取到的信息做聚类即可


↙↙↙阅读原文可查看相关链接,并与作者交流