You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TelemetryDeck uses the identifierForVendor internally unless a default user is specified. However, the hashedDefaultUser method provided below only returns a non-nil value if a default user is provided.
I'd like to just be able to get the hashed default user of the internal value, even without setting a default user with updateDefaultUser.
Currently, I set the default user to identifierForVendor as specified in the documentation here but it seems an unnecessary step to "make hashedDefaultUser work".
Unless I'm missing something.
Thanks!
The text was updated successfully, but these errors were encountered:
The hashedDefaultUser was introduced in #180 with the following reasoning:
This allows customers to access the hashed version of the user string they’ve set, in order to hand it over to other SDKs or webhooks.
While the main goal clearly was to give a convenient way to users to access the hashed default user when a custom one was set, I don't really see any reason why this should only work then a custom value was set. I think you're right that the default identifierForVendor-based value should be returned here if the user has not provided a custom user.
I just implemented a fix for this in #214. But please note that the fix requires that we mark the hashedDefaultUser with the @MainActor attribute, which technically is a breaking change. So I leave it to @winsmith to decide if the tradeoff is worth the change (at least for users who migrated to the Swift 6 world).
I personally think you're right, but we've been shipping other changes recently in our SDK in other places, too. So we have to be cautious about our users' reaction to these kinds of things.
TelemetryDeck uses the
identifierForVendor
internally unless a default user is specified. However, thehashedDefaultUser
method provided below only returns a non-nil value if a default user is provided.I'd like to just be able to get the hashed default user of the internal value, even without setting a default user with
updateDefaultUser
.Currently, I set the default user to
identifierForVendor
as specified in the documentation here but it seems an unnecessary step to "makehashedDefaultUser
work".Unless I'm missing something.
Thanks!
The text was updated successfully, but these errors were encountered: