I have a problem handling push message send with parse.com, when app is running i can handle json and construct message with:
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo
But when app is in background or killed, this message is handle and send direct to notification bar. I tried to handle in this function:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
....
UILocalNotification *localNotif = [launchOptions objectForKey:UIApplicationLaunchOptionsRemoteNotificationKey];
if (localNotif) {
[[UIApplication sharedApplication] setApplicationIconBadgeNumber: 99];
UIAlertView *BOOM = [[UIAlertView alloc] initWithTitle:@"BOOM"
message:@"app was INACTIVE"
delegate:self
cancelButtonTitle:@"a-ha!"
otherButtonTitles:nil];
[BOOM show];
NSLog(@"App was NOT ACTIVE");
}
.....
est this responses, but i can't handle push messages:
Handling Push Notifications when App is NOT running
Can't handle push notifications when app is running background
Handling push notifications when app is not running (App is Killed)
how can I handle push notification when my app is not running
Any help ? Thx.