[iOS] Statistics logging api fix. sourceApplication can be nil

This commit is contained in:
Kirill Zhdanovich 2013-08-14 16:22:15 +03:00 committed by Alex Zolotarev
parent 2a5cd0ea7d
commit 98519a1ff8

View file

@ -39,7 +39,10 @@
- (void)logApiUsage:(NSString *)programName
{
[[Statistics instance] logEvent:@"Api Usage" withParameters: @{@"Application Name" : programName}];
if (programName)
[[Statistics instance] logEvent:@"Api Usage" withParameters: @{@"Application Name" : programName}];
else
[[Statistics instance] logEvent:@"Api Usage" withParameters: @{@"Application Name" : @"Error passing nil as SourceApp name."}];
}
+ (Statistics *) instance