Skip to content

Identify userId is optional but the implementation does not reflect this #1024

Open
@danielgomezrico

Description

@danielgomezrico

This validation does not work if the userId is null:
https://github.com/segmentio/analytics-ios/blob/master/Segment/Classes/SEGAnalytics.m#L272

But here it is checked: https://github.com/segmentio/analytics-ios/blob/master/Segment/Classes/SEGAnalytics.m#L293

It is defined as optional on https://segment.com/docs/connections/sources/catalog/libraries/mobile/ios/#identify
image

I found this because the flutter implementation of segment (claimsforce-gmbh/flutter-segment#59) allowed userId to be null, but it throws this error:

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions