firebase / firebase/firebase-ios-sdk
Firebase Analytics: unable to clear user id in debug view
- Dominant language
- C++
- Stars
- 6.7k
- Forks
- 1.8k
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 75
Description
### Step 1: Describe your environment
* Xcode version: 11.2
* Firebase SDK version: 6.15.0
* Firebase Component: analytics
* Component version: 6.15.0
* Installation method: `CocoaPods`
### Step 2: Describe the problem
#### Steps to reproduce:
I am trying to clear the user id of the current user after a user logs out of my app. In my log out sequence I call the following:
Analytics.setUserID(nil)
In the documentation of this method it says:
> The user ID to ascribe to the user of this app on this device, which must be non-empty and no more than 256 characters long. **Setting userID to nil removes the user ID.**
So as far as I can tell I'm clearing it correctly.
However.
When I am in debugView on firebase console, I see no indication that the user id has been cleared and when I look at subsequent events after clearing the user id, I can see under user properties, the old user id of the logged out user. I would expect this field to be empty here.
Not sure if this is a bug on debug view of the firebase console or if I'm doing something wrong?
It should be noted that when I try to set the user id as such below, I can see the user id being set in debug view and events having that id under user properties:
Analytics.setUserID("1234")
Contributor guide
Assessment
This issue has not been assessed yet.