如何从运行iOS 9的用户获取崩溃日志 [英] How to obtain crash logs from users running iOS 9

查看:273
本文介绍了如何从运行iOS 9的用户获取崩溃日志的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

虽然我们曾经能够在用户与iTunes Connect同步 〜/ Library / Logs / CrashReporter / MobileDevice / ,现在大多数用户不要这样做。因此,在iOS9上获取崩溃日志的新流程是此处概述由Apple。

While we used to be able to obtain crash logs when users sync'd with iTunes Connect at ~/Library/Logs/CrashReporter/MobileDevice/, now most users don't do this. Thus, the new process for obtaining crash logs on iOS9 is outlined here by Apple.

具体来说:


  1. 打开设置应用

  2. 转到隐私,然后是诊断&用法

  3. 选择诊断&使用数据

  4. 找到崩溃的应用程序的日志。日志将以以下格式命名:

  5. 选择所需的日志。然后,使用文本选择UI选择日志的整个文本。选择文本后,点按复制

  6. 将复制的文本粘贴到Mail并根据需要发送到电子邮件地址

  1. Open Settings app
  2. Go to Privacy, then Diagnostics & Usage
  3. Select Diagnostics & Usage Data
  4. Locate the log for the crashed app. The logs will be named in the format:
  5. Select the desired log. Then, using the text selection UI select the entire text of the log. Once the text is selected, tap Copy
  6. Paste the copied text to Mail and send to an email address as desired

但是,这是我的大多数用户最终发送给我的信息,如下所示。我没有看到与堆栈有关的任何内容:

However, this is what most my users end up sending to me, below. I see nothing useful pertaining to a stack:

{"bug_type":"179","os_version":"iPhone OS 9.2 (13C75)"}
{
"scheduled" : true,
"machine_config" : "iPhone7,1",
"log_version" : 2,
"region_format" : "US",
"os_version" : "iPhone OS 9.2 (13C75)",
"language" : "en-US",
"sessions_data" : [
{
"app_arch" : "arm-64bit",
"app_build_version" : "0018",
"app_version" : "5.0001",
"app_adamid" : 00000000,
"app_sessionreporter_key" : "FFFFFFFF-1C4B-40E5-B631-BF9AE48B775D",
"app_storefront" : 143441,
"app_bundleid" : "com.myapp",
"app_events" : [
{
"date" : "2015-12-29T07:21:17-0800",
"state" : "foregroundRunning",
"type" : "app_session",
"duration" : 390
},
{
"date" : "2015-12-29T07:28:46-0800",
"state" : "foregroundRunning",
"type" : "app_session",
"duration" : 2
},
{
"date" : "2015-12-29T07:52:30-0800",
"state" : "foregroundRunning",
"type" : "app_session",
"duration" : 8
},
{
"date" : "2015-12-29T09:11:23-0800",
"state" : "foregroundRunning",
"type" : "app_session",
"duration" : 29
},
{
"date" : "2015-12-29T09:45:41-0800",
"state" : "foregroundRunning",
"type" : "app_session",
"duration" : 830
},
{
"date" : "2015-12-29T10:13:13-0800",
"state" : "foregroundRunning",
"type" : "app_session",
"duration" : 227
},
{
"date" : "2015-12-29T12:15:17-0800",
"state" : "foregroundRunning",
"type" : "app_session",
"duration" : 228
},
{
"date" : "2015-12-29T12:20:55-0800",
"state" : "foregroundRunning",
"type" : "app_session",
"duration" : 439
},
{
"date" : "2015-12-29T13:33:47-0800",
"state" : "foregroundRunning",
"type" : "app_session",
"duration" : 59
},
{
"date" : "2015-12-29T14:51:18-0800",
"state" : "foregroundRunning",
"type" : "app_session",
"duration" : 128
},
{
"date" : "2015-12-29T15:19:31-0800",
"state" : "foregroundRunning",
"type" : "app_session",
"duration" : 428
},
{
"date" : "2015-12-29T15:31:50-0800",
"state" : "foregroundRunning",
"type" : "app_session",
"duration" : 93
}
],
"app_is_beta" : false,
"slice_uuid" : "98293BB1-C91D-386F-825E-771AB68D9BE4",
"app_cohort" : "3|date=1310628600000&sf=143441"
},
{
"app_arch" : "arm-64bit",
"app_build_version" : "18972819",
"app_version" : "46.0",
"app_adamid" : 284882215,
"app_sessionreporter_key" : "B5155ABF-327F-4CCE-AEFB-8C733DC6EC96",
"app_storefront" : 143441,
"app_bundleid" : "com.facebook.Facebook",
"app_events" : [
{
"date" : "2015-12-29T10:00:55-0800",
"state" : "foregroundRunning",
"type" : "app_session",
"duration" : 473
}
],
"app_is_beta" : false,
"slice_uuid" : "F5D785A1-9DAF-32F7-A6DB-9738AF007735",
"app_cohort" : "3|date=1254358800000&sf=143441"
},
{
"app_arch" : "arm-64bit",
"app_build_version" : "20150927.114236",
"app_version" : "7.1.1",
"app_adamid" : 329670577,
"app_sessionreporter_key" : "D69640D5-7389-4148-B3DF-2093F1C486A4",
"app_storefront" : 143441,
"app_bundleid" : "com.taptaptap.CameraPlus",
"app_events" : [
{
"date" : "2015-12-29T15:04:40-0800",
"state" : "foregroundRunning",
"type" : "app_session",
"duration" : 685
}
],
"app_is_beta" : false,
"slice_uuid" : "327F314B-C34D-3015-A41C-0DB1374A0095",
"app_cohort" : "3|date=1301902200000&sf=143441"
}
],
"log_timestamp" : "2015-12-29T15:48:31-0800"

Apple网站上描述的流程实际上是工作?如果是这样,对我的所有用户能够提供的原因的任何推测都是下面的截断形式?如果没有,我可以从我的用户获取设备崩溃日志的过程是什么,而不涉及尝试让他们安装XCode?

Does the process described on Apple's website above actually work? If so, any speculation on why all my users are able to provide is the truncated form below? And if not, what is the process by which I may obtain on-device crash logs from my users that does not involve trying to get them to install XCode?

推荐答案

你有没有试过 Crashlytics ?它会自动发送崩溃日志并为您报告调用堆栈和其他有用的详细信息。

Have you ever try Crashlytics yet? It send crash log automatically and report call stack for you and other useful details.

1)使用您的Podfile安装库

1) Install library using your Podfile

# Crashlytics
pod 'Fabric'
pod 'Crashlytics'

2)在AppDelegate中导入

2) Import in AppDelegate

目标C

#import <Fabric/Fabric.h>
#import <Crashlytics/Crashlytics.h>

Swift

import Fabric
import Crashlytics

3)didFinishLaunchingWithOptions中的初始崩溃性

3) Initial crashlytics in didFinishLaunchingWithOptions

目标C

[Fabric with:@[[Crashlytics class]]];

Swift

Fabric.with([Crashlytics.self])

这篇关于如何从运行iOS 9的用户获取崩溃日志的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆