【问题标题】:Where can I find the Fabric setUserIdentifier key value?我在哪里可以找到 Fabric setUserIdentifier 键值?
【发布时间】:2018-08-04 19:19:11
【问题描述】:

请告诉我在 Fabric Crashlytics 上哪里可以找到 setUserIdentifier 键?

Crashlytics.sharedInstance().setUserEmail("user@mail.com")
Crashlytics.sharedInstance().setUserIdentifier("12345")
Crashlytics.sharedInstance().setUserName("Test User")


Crashlytics.sharedInstance().setUserIdentifier("??????????"). where to find the key here?

【问题讨论】:

  • 来自 Fabric 的 Mike。你的意思是它在 Fabric 网站的哪个位置?
  • 是的!在面料网站哪里可以找到。

标签: crashlytics google-fabric


【解决方案1】:

这是由您的应用程序创建的任意标识符。通常由一些散列函数(MD5、SHA-1 等)从电子邮件生成。基本上,此 id 可用于引用特定用户,而不是在 Crashlytics 日志、UI 和报告中显示其电子邮件、姓名、姓氏等。

这是文档:

/**
 *  Specify a user identifier which will be visible in the Crashlytics UI.
 *
 *  Many of our customers have requested the ability to tie crashes to specific end-users of their
 *  application in order to facilitate responses to support requests or permit the ability to reach
 *  out for more information. We allow you to specify up to three separate values for display within
 *  the Crashlytics UI - but please be mindful of your end-user's privacy.
 *
 *  We recommend specifying a user identifier - an arbitrary string that ties an end-user to a record
 *  in your system. This could be a database id, hash, or other value that is meaningless to a
 *  third-party observer but can be indexed and queried by you.
 *
 *  Optionally, you may also specify the end-user's name or username, as well as email address if you
 *  do not have a system that works well with obscured identifiers.
 *
 *  Pursuant to our EULA, this data is transferred securely throughout our system and we will not
 *  disseminate end-user data unless required to by law. That said, if you choose to provide end-user
 *  contact information, we strongly recommend that you disclose this in your application's privacy
 *  policy. Data privacy is of our utmost concern.
 *
 *  @param identifier An arbitrary user identifier string which ties an end-user to a record in your system.
 */
- (void)setUserIdentifier:(nullable NSString *)identifier;

【讨论】:

    【解决方案2】:

    来自 Fabric 的 Mike。要在您的 Fabric 仪表板中找到它,请使用以下步骤:

    1. 在 Crashlytics 仪表板中,单击特定问题。
    2. 根据具体问题,点击“查看所有会话”。
    3. 如果在页面最右侧的“设备统计信息”下登录,您将在此处看到用户标识符。

    【讨论】:

    • 以及在使用 Firebase Crashlytics 时如何查看?用户名是根据firebase.google.com/docs/crashlytics/… 设置的
    • Mike in Firebase setUserIdentifier 似乎不适用于发布版本这是设计使然吗?
    • 这应该在 Firebase 中工作:firebase.google.com/docs/crashlytics/… - Crashlytics.sharedInstance().setUserIdentifier("123456789") 或 Crashlytics.setUserIdentifier("user123456789");分别取决于 iOS 或 Android。如果它不起作用,我建议联系支持进行诊断。
    猜你喜欢
    • 2014-07-16
    • 2012-05-30
    • 2013-07-13
    • 2012-06-05
    • 2011-04-24
    • 2021-02-02
    • 2016-07-02
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多