Manos Chorianopoulos

Possible fix for push crash

......@@ -263,9 +263,21 @@ static const char* jailbreak_apps[] =
return;
}
NSData *jsonData = [NSJSONSerialization dataWithJSONObject:userInfo options:NSJSONWritingPrettyPrinted error:nil];
NSString *jsonString = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
WLLOG(@"Did receive push: %@", jsonString);
@try {
NSData *jsonData = [NSJSONSerialization dataWithJSONObject:userInfo options:NSJSONWritingPrettyPrinted error:nil];
NSString *jsonString = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
WLLOG(@"Did receive push: %@", jsonString);
}
@catch (NSException *exception) {
// NSLog(@"Print userInfo error: %@", exception.reason);
}
@finally {
// NSLog(@"Finally condition");
}
// NSData *jsonData = [NSJSONSerialization dataWithJSONObject:userInfo options:NSJSONWritingPrettyPrinted error:nil];
// NSString *jsonString = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
// WLLOG(@"Did receive push: %@", jsonString);
WLInboxItem *inboxItem = [[WLInboxItem alloc] initWithAttributes:userInfo] ;
// [WLAnalyticsManager logUserReceivedPush:inboxItem];
......@@ -346,9 +358,20 @@ static const char* jailbreak_apps[] =
state = WLApplicationStateBackground;
NSData *jsonData = [NSJSONSerialization dataWithJSONObject:userInfo options:NSJSONWritingPrettyPrinted error:nil];
NSString *jsonString = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
WLLOG(@"Did receive push: %@", jsonString);
@try {
NSData *jsonData = [NSJSONSerialization dataWithJSONObject:userInfo options:NSJSONWritingPrettyPrinted error:nil];
NSString *jsonString = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
WLLOG(@"Did receive push: %@", jsonString);
}
@catch (NSException *exception) {
// NSLog(@"Print userInfo error: %@", exception.reason);
}
@finally {
// NSLog(@"Finally condition");
}
// NSData *jsonData = [NSJSONSerialization dataWithJSONObject:userInfo options:NSJSONWritingPrettyPrinted error:nil];
// NSString *jsonString = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
// WLLOG(@"Did receive push: %@", jsonString);
WLInboxItem *inboxItem = [[WLInboxItem alloc] initWithAttributes:userInfo] ;
// [WLAnalyticsManager logUserReceivedPush:inboxItem];
......@@ -430,9 +453,20 @@ static const char* jailbreak_apps[] =
state = WLApplicationStateBackground;
NSData *jsonData = [NSJSONSerialization dataWithJSONObject:userInfo options:NSJSONWritingPrettyPrinted error:nil];
NSString *jsonString = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
WLLOG(@"Did receive push: %@", jsonString);
@try {
NSData *jsonData = [NSJSONSerialization dataWithJSONObject:userInfo options:NSJSONWritingPrettyPrinted error:nil];
NSString *jsonString = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
WLLOG(@"Did receive push: %@", jsonString);
}
@catch (NSException *exception) {
// NSLog(@"Print userInfo error: %@", exception.reason);
}
@finally {
// NSLog(@"Finally condition");
}
// NSData *jsonData = [NSJSONSerialization dataWithJSONObject:userInfo options:NSJSONWritingPrettyPrinted error:nil];
// NSString *jsonString = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
// WLLOG(@"Did receive push: %@", jsonString);
WLInboxItem *inboxItem = [[WLInboxItem alloc] initWithAttributes:userInfo] ;
// [WLAnalyticsManager logUserReceivedPush:inboxItem];
......