FR: Allow passing nil to Crashlytics.setUserID to match Firebase Analytics and old Fabric Crashlytics APIs

Feature proposal

  • Firebase Component: Crashlytics

Both Firebase and Fabric Crashlytics allow passing nil to clear the user identifier. It would be nice if Firebase Crashlytics allowed this as well, especially now that it’s the recommended replacement for Fabric Crashlytics.

If this change was made, I’d expect to be able to clear a previously assigned user ID by calling:

Firebase.Crashlytics.crashlytics().setUserID(nil)

1 possible answer(s) on “FR: Allow passing nil to Crashlytics.setUserID to match Firebase Analytics and old Fabric Crashlytics APIs

  1. After reading the online documentation (as opposed to the comments in the headers) for the new Firebase Crashlytics library, I found the following:

    If you ever need to clear a user identifier after you set it, reset the value to a blank string.

    I was primarily concerned about being able to clear the identifier in an officially documented manner, so that fulfills my needs. You can keep this issue open if you want the library to be consistent with the other Firebase libraries, but I’m fine with the issues being closed otherwise.