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];