Skip to content

Commit

Permalink
Updated for Flurry 4.x SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
thuss committed Oct 31, 2012
1 parent 4b66744 commit 1490b4a
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions AnalyticsKitFlurryProvider.m
Expand Up @@ -6,15 +6,15 @@
// Copyright (c) 2011 Bleacher Report. All rights reserved. // Copyright (c) 2011 Bleacher Report. All rights reserved.
// //


#import "FlurryAnalytics.h" #import "Flurry.h"
#import "AnalyticsKitFlurryProvider.h" #import "AnalyticsKitFlurryProvider.h"


@implementation AnalyticsKitFlurryProvider @implementation AnalyticsKitFlurryProvider


-(id<AnalyticsKitProvider>)initWithAPIKey:(NSString *)apiKey { -(id<AnalyticsKitProvider>)initWithAPIKey:(NSString *)apiKey {
self = [super init]; self = [super init];
if (self) { if (self) {
[FlurryAnalytics startSession:apiKey]; [Flurry startSession:apiKey];
} }
return self; return self;
} }
Expand All @@ -36,58 +36,58 @@ -(void)applicationWillTerminate {}


-(void)uncaughtException:(NSException *)exception { -(void)uncaughtException:(NSException *)exception {
NSString *message = [NSString stringWithFormat:@"Crash on iOS %@", [[UIDevice currentDevice] systemVersion]]; NSString *message = [NSString stringWithFormat:@"Crash on iOS %@", [[UIDevice currentDevice] systemVersion]];
[FlurryAnalytics logError:@"Uncaught" message:message exception:exception]; [Flurry logError:@"Uncaught" message:message exception:exception];
} }


-(void)logScreen:(NSString *)screenName {} -(void)logScreen:(NSString *)screenName {}


-(void)logEvent:(NSString *)value { -(void)logEvent:(NSString *)value {
[self runInMainThread:^{ [self runInMainThread:^{
[FlurryAnalytics logEvent:value]; [Flurry logEvent:value];
}]; }];
} }


-(void)logEvent:(NSString *)event withProperties:(NSDictionary *)dict { -(void)logEvent:(NSString *)event withProperties:(NSDictionary *)dict {
[self runInMainThread:^{ [self runInMainThread:^{
[FlurryAnalytics logEvent:event withParameters:dict]; [Flurry logEvent:event withParameters:dict];
}]; }];
} }


-(void)logEvent:(NSString *)event withProperty:(NSString *)key andValue:(NSString *)value { -(void)logEvent:(NSString *)event withProperty:(NSString *)key andValue:(NSString *)value {
[self runInMainThread:^{ [self runInMainThread:^{
[FlurryAnalytics logEvent:event withParameters:[NSDictionary dictionaryWithObject:value forKey:key]]; [Flurry logEvent:event withParameters:[NSDictionary dictionaryWithObject:value forKey:key]];
}]; }];
} }


- (void)logEvent:(NSString *)eventName timed:(BOOL)timed{ - (void)logEvent:(NSString *)eventName timed:(BOOL)timed{
[self runInMainThread:^{ [self runInMainThread:^{
[FlurryAnalytics logEvent:eventName timed:timed]; [Flurry logEvent:eventName timed:timed];
}]; }];
} }


- (void)logEvent:(NSString *)eventName withProperties:(NSDictionary *)dict timed:(BOOL)timed{ - (void)logEvent:(NSString *)eventName withProperties:(NSDictionary *)dict timed:(BOOL)timed{
[self runInMainThread:^{ [self runInMainThread:^{
[FlurryAnalytics logEvent:eventName withParameters:dict timed:timed]; [Flurry logEvent:eventName withParameters:dict timed:timed];


}]; }];
} }


-(void)endTimedEvent:(NSString *)eventName withProperties:(NSDictionary *)dict{ -(void)endTimedEvent:(NSString *)eventName withProperties:(NSDictionary *)dict{
[self runInMainThread:^{ [self runInMainThread:^{
// non-nil parameters will update the parameters // non-nil parameters will update the parameters
[FlurryAnalytics endTimedEvent:eventName withParameters:dict]; [Flurry endTimedEvent:eventName withParameters:dict];
}]; }];
} }


-(void)logError:(NSString *)name message:(NSString *)message exception:(NSException *)exception { -(void)logError:(NSString *)name message:(NSString *)message exception:(NSException *)exception {
[self runInMainThread:^{ [self runInMainThread:^{
[FlurryAnalytics logError:name message:message exception:exception]; [Flurry logError:name message:message exception:exception];
}]; }];
} }


-(void)logError:(NSString *)name message:(NSString *)message error:(NSError *)error { -(void)logError:(NSString *)name message:(NSString *)message error:(NSError *)error {
[self runInMainThread:^{ [self runInMainThread:^{
[FlurryAnalytics logError:name message:message error:error]; [Flurry logError:name message:message error:error];
}]; }];
} }


Expand Down

0 comments on commit 1490b4a

Please sign in to comment.