1

虽然我们过去可以在用户与 iTunes Connect 同步时获取崩溃日志~/Library/Logs/CrashReporter/MobileDevice/,但现在大多数用户不这样做。因此,Apple在此处概述了在 iOS9 上获取崩溃日志的新流程。

具体来说:

  1. 打开设置应用
  2. 转到隐私,然后是诊断和使用
  3. 选择诊断和使用数据
  4. 找到崩溃的应用程序的日志。日志将按以下格式命名:
  5. 选择所需的日志。然后,使用文本选择 UI 选择日志的整个文本。选择文本后,点击复制
  6. 将复制的文本粘贴到邮件并根据需要发送到电子邮件地址

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

{"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"

上面苹果网站上描述的过程真的有效吗?如果是这样,关于为什么我的所有用户都能够提供的任何猜测是下面的截断形式?如果没有,我可以通过什么过程从我的用户那里获取设备上的崩溃日志,而不涉及尝试让他们安装 XCode?

4

2 回答 2

1

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

1) 使用您的 Podfile 安装库

# Crashlytics
pod 'Fabric'
pod 'Crashlytics'

2) 在 AppDelegate 中导入

目标 C

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

迅速

import Fabric
import Crashlytics

3) didFinishLaunchingWithOptions 中的初始 crashlytics

目标 C

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

迅速

Fabric.with([Crashlytics.self])
于 2015-12-30T05:11:42.250 回答
0

对于 Mac 用户:

  1. 打开 Finder(在 Dock 中找到)
  2. 点击屏幕顶部的“前往”菜单,然后选择“前往文件夹”
  3. 输入(或粘贴):~/Library/Logs/CrashReporter/MobileDevice/
  4. 打开与您的设备具有相同“名称”的文件夹。(注意:您的设备名称出现在 iTunes 左侧的“设备”下方)。
  5. 选择相关日志

礼貌链接https ://help.getpocket.com/customer/portal/articles/500338-how-to-find-the-iphone-ipad-app-crash-logs

于 2015-12-30T08:19:22.790 回答