Skip to content

Null userId and traits update fixes #199

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Mar 8, 2023
Merged

Null userId and traits update fixes #199

merged 5 commits into from
Mar 8, 2023

Conversation

bsneed
Copy link
Contributor

@bsneed bsneed commented Mar 7, 2023

  • Update objc identify method to accept nil userid and allow trait updates.
  • Added test

analytics.identify(userId: userId, traits: traits)
public func identify(userId: String?, traits: [String: Any]?) {
if let userId = userId {
analytics.identify(userId: userId, traits: traits)
Copy link
Contributor

@didiergarcia didiergarcia Mar 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like a recursive infinite loop?

On line 68: is userId not an Optional anymore? and is there identify() function that doesn't take an optional that this will go to instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is calling into the swift version of identify where userId is not optional.

@bsneed bsneed merged commit c5401b2 into main Mar 8, 2023
@bsneed bsneed deleted the bsneed/traits branch March 8, 2023 20:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants