analytics-ios
analytics-ios copied to clipboard
Identify `userId` is optional but the implementation does not reflect this
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
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
Any updates here? Have you had success passing an empty string? Why have you closed that PR on the flutter_segment repo?
@HerrNiklasRaab It was closed because that repo became deprecated, now that library works in https://github.com/la-haus/flutter-segment.
The issue is still there, but from the library we send an empty string to it, it does not seem like the best way to do it :(
Hey thx for the response, but does it work? Have you found any drawbacks with it?
Daniel Gomez @.***> schrieb am Di. 1. März 2022 um 21:22:
@HerrNiklasRaab https://github.com/HerrNiklasRaab It was closed because that repo became deprecated, now that library works in https://github.com/la-haus/flutter-segment.
The issue is still there, but from the library we send an empty string to it, it does not seem like the best way to do it :(
— Reply to this email directly, view it on GitHub https://github.com/segmentio/analytics-ios/issues/1024#issuecomment-1055825970, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGYV7OPNN2CG73OKELBKSXLU5Z4A3ANCNFSM5KJZV75A . You are receiving this because you were mentioned.Message ID: @.***>
-- Niklas Raab
CTO - Geschäftsführer
CodingPassion GmbH +49 (0) 1575 2589725 <+49+(0)+1575+2589725> @.*** codingpassion.net 83064 Raubling, Inntalstr. 3 [image: linkedin] https://www.linkedin.com/in/niklas-raab/ Create Your Own Free Signature https://www.hubspot.com/email-signature-generator?utm_source=create-signature
I haven't found drawbacks, but if you find them, let me know
Hey, I stumbled upon the same issue when using flutter-segment. The cause of this issue is not in this library but in the flutter-segment library. Here is a fix: https://github.com/la-haus/flutter-segment/pull/28