Please check the device token or not. For which the device token sends push notifications. Also, a push notification should check the background mode of the application.
If all of the above is correct, you will receive a push notification.
Also check these two methods in the application deletion and send the device token from the iOS application to the server:
- (void)application:(UIApplication *)app didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken { NSString *str = [NSString stringWithFormat:@"Device Token=%@",deviceToken]; str = [str stringByReplacingOccurrencesOfString:@" " withString:@""]; NSLog(@"This is device token%@", str); } - (void)application:(UIApplication *)app didFailToRegisterForRemoteNotificationsWithError:(NSError *)err { NSString *str = [NSString stringWithFormat: @"Error: %@", err]; NSLog(@"Error %@",err); }
source share