Skip to content

Commit 1887e85

Browse files
christibbsmaksymmalyhin
authored andcommitted
Early return from sending analytics events in instance ID is nil (#3007)
1 parent f9f346f commit 1887e85

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Firebase/InAppMessaging/Analytics/FIRIAMClearcutLogger.m

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,13 @@ - (void)logAnalyticsEventForType:(FIRIAMAnalyticsLogEventType)eventType
149149
eventTimeInMs = @((long)nowInMs);
150150
}
151151

152+
if (!iid) {
153+
FIRLogWarning(kFIRLoggerInAppMessaging, @"I-IAM210009",
154+
@"Instance ID is nil, event %ld for campaign ID %@ will not be sent",
155+
(long)eventType, campaignID);
156+
return;
157+
}
158+
152159
NSString *sourceExtensionJsonString =
153160
[self constructSourceExtensionJsonForClearcutWithEventType:eventType
154161
forCampaignID:campaignID

0 commit comments

Comments
 (0)