【问题标题】:How to add addtional information to hockeyapp (appcenter) crash report in Xamarin?如何在 Xamarin 中向 hockeyapp(应用中心)崩溃报告添加其他信息?
【发布时间】:2018-06-04 16:35:32
【问题描述】:

我正在关注https://support.hockeyapp.net/kb/client-integration-cross-platform/how-to-integrate-hockeyapp-with-xamarin 的文章,试图将更多信息添加到 hockeyapp 的崩溃数据中。

收集崩溃报告:如果您的应用崩溃,则会将崩溃日志写入设备的存储空间。如果用户再次启动应用程序,他们将被要求向 HockeyApp 提交崩溃报告。这适用于 beta 和 live 应用程序,即那些提交到 App Store 的应用程序。崩溃日志包含可帮助您解决问题的可行信息。 此外,作为开发人员,您还可以向报告中添加其他信息。

我在Add custom information to HockeyApp crash reporthttps://support.hockeyapp.net/kb/client-integration-ios-mac-os-x-tvos/how-to-add-application-specific-log-data-on-ios-or-os-x 找到了一些示例代码,但它在objective-c 和swift 中,我如何在Xamarin / c# 中做到这一点?

【问题讨论】:

    标签: xamarin xamarin.ios crash-reports hockeyapp


    【解决方案1】:

    我假设您想使用 AppCenter 而不是 HockeyApp。 使用 AppCenter,您需要告诉 AppCenter 客户端应该注意什么。如果你想使用崩溃和分析,你的开始应该是这样的:

    AppCenter.Start("YOUR KEY", typeof(Analytics), typeof(Crashes));
    

    如果你想报告异常,你可以很容易地做到这一点:

    Crashes.TrackError(exception);
    

    可以用字典添加其他信息:

    var additionalInformation = new Dictionary<string, string>();
    additionalInformation.Add("TITLE", "VALUE");
    
    Crashes.TrackError(exception, additionalInformation);
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-11-10
      • 1970-01-01
      相关资源
      最近更新 更多