for some reason, I canโt get my push notifications in order to make the default sound, or update the icon number when I receive them. Here is my code below. Do you think something is wrong with my code? Or is there a configuration issue that I don't know about? Thanks for your help!
PFQuery *pushQuery = [PFInstallation query]; [pushQuery whereKey:@"installationUser" containedIn:recipients]; // Send push notification to our query PFPush *push = [[PFPush alloc] init]; [push setQuery:pushQuery]; NSDictionary *data = [NSDictionary dictionaryWithObjectsAndKeys: message, @"alert", @"Increment", @"badge", nil]; [push setData:data]; [push setMessage:[NSString stringWithFormat:@"%@ sent you a photo!", currentUser.username]]; [push sendPushInBackgroundWithBlock:^(BOOL succeeded, NSError *error) { if(!error) { NSLog(@"Push notification sent!"); } }];
source share