Skip to content
Browse files

Switched analytics kit debug provider to show ui alert view's on the …

…main thread
  • Loading branch information...
1 parent 81b38b2 commit ab020e55c57b179a33c9b63952d0a4f06e45dbb4 @thuss thuss committed May 31, 2012
Showing with 7 additions and 5 deletions.
  1. +7 −5 AnalyticsKitDebug.m
View
12 AnalyticsKitDebug.m
@@ -40,11 +40,13 @@ -(void)endTimedEvent:(NSString *)eventName withProperties:(NSDictionary *)dict{}
-(void)showDebugAlert:(NSString *)message{
if (DEBUG == 1){
- UIAlertView *alert = [[[UIAlertView alloc] initWithTitle:@"AnalyticsKit Received Error"
- message:message
- delegate:self cancelButtonTitle:@"Ok"
- otherButtonTitles:nil] autorelease];
- [alert show];
+ [[NSOperationQueue mainQueue] addOperationWithBlock:^{
+ UIAlertView *alert = [[[UIAlertView alloc] initWithTitle:@"AnalyticsKit Received Error"
+ message:message
+ delegate:self cancelButtonTitle:@"Ok"
+ otherButtonTitles:nil] autorelease];
+ [alert show];
+ }];
}
}

0 comments on commit ab020e5

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