gpt4 book ai didi

react-native - 如何获取 React Native 应用程序的崩溃日志?

转载 作者:行者123 更新时间:2023-12-03 14:29:51 27 4
gpt4 key购买 nike

我的 React Native 应用程序在测试人员的手机上崩溃了。

获取崩溃日志的最佳方法是什么?我正在使用 React Native 0.14.2

最佳答案

正如@Abhishek 所评论的那样,您必须使用一些监控工具 crashlytics以获取此类信息。
Fabric在这种情况下是一个不错的选择。它带有 crashlytics解决方案。
Here is a blogpost这深入解释了如何为您的应用程序设置它。
这是博客文章中 Fabric 的 crashlytics 工具功能的摘录

Crash Reporting —It will record every single crash and its stack trace. This is way better than the iTunes Connect crash reports, which only include the info of users that opted in to share information with developers while setting up a new iPhone. It’s also not updated in real-time (you can read more about this here).

Crash Logs — (A.K.A. CLS_LOG) If you’re familiar with Objective-C, you have probably been using “NSLog” while you’re developing your app. You should use CLS_LOG instead. There’s no difference at all when you’re debugging (whatever you’re logging will still show up in the console) but the cool part is that when a user crashes your app, all the information will be sent to Crashlytics’s servers the next time the user launches your app, including all the content that you’ve logged through CLS_LOG. So if you log information for most of the actions/events in your app, you can read the logs later and reproducing the crash should be simple.

关于react-native - 如何获取 React Native 应用程序的崩溃日志?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36731694/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com