From 56fe1898e7070d316bc78063bbac443891f71fe5 Mon Sep 17 00:00:00 2001 From: zenled Date: Thu, 12 May 2022 08:47:26 +0200 Subject: [PATCH] Converting userId from NSNull to nil --- ios/Classes/FlutterSegmentPlugin.m | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ios/Classes/FlutterSegmentPlugin.m b/ios/Classes/FlutterSegmentPlugin.m index 2c7b1245..60eebf98 100644 --- a/ios/Classes/FlutterSegmentPlugin.m +++ b/ios/Classes/FlutterSegmentPlugin.m @@ -187,6 +187,8 @@ - (void)identify:(FlutterMethodCall*)call result:(FlutterResult)result { NSDictionary *traits = call.arguments[@"traits"]; NSDictionary *options = call.arguments[@"options"]; + userId = [userId isEqual:[NSNull null]]? nil: userId; + [[SEGAnalytics sharedAnalytics] identify: userId traits: traits options: options];