Skip to content

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.

4 participants