Skip to content
Browse files

Adding Debug provider

  • Loading branch information...
1 parent 429b994 commit 1fdd3ea8d860815ef2c80a888667c7d2a764d638 @sherpachick sherpachick committed May 29, 2012
Showing with 44 additions and 0 deletions.
  1. +13 −0 AnalyticsKitDebug.h
  2. +31 −0 AnalyticsKitDebug.m
View
13 AnalyticsKitDebug.h
@@ -0,0 +1,13 @@
+//
+// AnalyticsKitDebug.h
+// TeamStream
+//
+// Created by Susan Detwiler on 5/29/12.
+// Copyright (c) 2012 Bleacher Report. All rights reserved.
+//
+
+#import "AnalyticsKit.h"
+
+@interface AnalyticsKitDebug : AnalyticsKit
+
+@end
View
31 AnalyticsKitDebug.m
@@ -0,0 +1,31 @@
+//
+// AnalyticsKitDebug.m
+// TeamStream
+//
+// Created by Susan Detwiler on 5/29/12.
+// Copyright (c) 2012 Bleacher Report. All rights reserved.
+//
+
+#import "AnalyticsKitDebug.h"
+
+@implementation AnalyticsKitDebug
+
+-(void)showDebugAlert:(NSString *)message{
+ if (DEBUG == 1){
+ UIAlertView *alert = [[[UIAlertView alloc] initWithTitle:@"AnalyticsKit Error"
+ message:message
+ delegate:self cancelButtonTitle:@"Ok"
+ otherButtonTitles:nil] autorelease];
+ [alert show];
+ }
+}
+
+-(void)logError:(NSString *)name message:(NSString *)message exception:(NSException *)exception{
+ [self showDebugAlert:message];
+}
+
+-(void)logError:(NSString *)name message:(NSString *)message error:(NSError *)error{
+ [self showDebugAlert:message];
+}
+
+@end

0 comments on commit 1fdd3ea

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