Skip to content

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

@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 (https://github.com/claimsforce-gmbh/flutter-segment/pull/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
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions