segmentio / analytics-ios

The hassle-free way to integrate analytics into any iOS application.
https://segment.com/libraries/ios
MIT License
402 stars 334 forks source link

Allow userId to be nullable on identify for iOS #1025

Open danielgomezrico opened 2 years ago

danielgomezrico commented 2 years ago

What does this PR do? Allow that userId to be null on identify

How should this be manually tested? Call identify with userId null, like:

[[SEGAnalytics sharedAnalytics] identify: null traits: {"something": "other"}];

It throws an exception:

[NSNull length]: unrecognized selector sent to instance 0x1db450558

Fix https://github.com/segmentio/analytics-ios/issues/1024

Screenshots or screencasts (if UI/UX change) On docs the userId is defined as optional https://segment.com/docs/connections/sources/catalog/libraries/mobile/ios/#identify image

danielgomezrico commented 2 years ago

@prayansh Hi, Im not sure why the CI fails here, it looks like it is a configuration error from the repo, can we merge this? it is pretty important for our company to allow this fast

danielgomezrico commented 2 years ago

@prayansh ping

HerrNiklasRaab commented 2 years ago

Hey @wenxi-zeng, any chance this can get merged real quick?

danielgomezrico commented 1 year ago

👀 ping