本文介绍了如何从运行iOS 9的用户获取崩溃日志的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
虽然我们曾经能够在 〜/ Library / Logs / CrashReporter / MobileDevice /
,现在大多数用户不要这样做。因此,在iOS9上获取崩溃日志的新流程是?它会自动发送崩溃日志并为您报告调用堆栈和其他有用的详细信息。
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的用户获取崩溃日志的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!