Skip to content
Browse files

Merge pull request #3 from zacshenker/master

New Relic Mobile Monitoring Support
  • Loading branch information...
2 parents e71ca15 + 2701c56 commit 8c1060a8e37fb4e426b9b07bf7d21a22f6ae319e @twobitlabs committed Mar 27, 2013
Showing with 62 additions and 0 deletions.
  1. +16 −0 AnalyticsKitNewRelicProvider.h
  2. +46 −0 AnalyticsKitNewRelicProvider.m
View
16 AnalyticsKitNewRelicProvider.h
@@ -0,0 +1,16 @@
+//
+// AnalyticsKitNewRelicProvider.h
+//
+//
+// Created by Zac Shenker on 26/03/2013.
+// Copyright (c) 2013 Collusion. All rights reserved.
+//
+
+#import "AnalyticsKit.h"
+
+@interface AnalyticsKitNewRelicProvider : NSObject<AnalyticsKitProvider>
+
+-(id<AnalyticsKitProvider>)initWithAPIKey:(NSString *)apiKey;
+
+@end
+
View
46 AnalyticsKitNewRelicProvider.m
@@ -0,0 +1,46 @@
+//
+// AnalyticsKitNewRelicProvider.m
+//
+//
+// Created by Zac Shenker on 26/03/13.
+// Copyright (c) 2013 Collusion. All rights reserved.
+//
+
+#import <NewRelicAgent/NewRelicAgent.h>
+#import "AnalyticsKitNewRelicProvider.h"
+
+@implementation AnalyticsKitNewRelicProvider
+
+-(id<AnalyticsKitProvider>)initWithAPIKey:(NSString *)apiKey {
+ self = [super init];
+ if (self) {
+ [NewRelicAgent startWithApplicationToken:apiKey];
+ }
+ return self;
+}
+
+-(void)applicationWillEnterForeground {}
+-(void)applicationDidEnterBackground {}
+-(void)applicationWillTerminate {}
+
+-(void)uncaughtException:(NSException *)exception {}
+
+-(void)logScreen:(NSString *)screenName {}
+
+-(void)logEvent:(NSString *)event {}
+
+-(void)logEvent:(NSString *)event withProperties:(NSDictionary *)dict {}
+
+-(void)logEvent:(NSString *)event withProperty:(NSString *)key andValue:(NSString *)value {}
+
+- (void)logEvent:(NSString *)eventName timed:(BOOL)timed{}
+
+- (void)logEvent:(NSString *)eventName withProperties:(NSDictionary *)dict timed:(BOOL)timed{}
+
+-(void)endTimedEvent:(NSString *)eventName withProperties:(NSDictionary *)dict{}
+
+-(void)logError:(NSString *)name message:(NSString *)message exception:(NSException *)exception {}
+
+-(void)logError:(NSString *)name message:(NSString *)message error:(NSError *)error {}
+
+@end

0 comments on commit 8c1060a

Please sign in to comment.
Something went wrong with that request. Please try again.