Reputation: 531
I have created all required certificates for push notification and in back end push bot is used. i get push notification from push bot but following method is not get called.
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo
I have included push bot framework and followed all procedure. what is wrong with my code or there is any problem from back end. i am not able to find out the solution.
Upvotes: 0
Views: 245
Reputation:
There may be many reason not one. I will let you know the Steps. Make sure it is done.
1)Have you enabled push notification in Capabilities.if not please enable it.
2)Check your App identifier whether your bundleId matches and you enabled a push notification for that bundle ID.
3)The Sample code for iOS8 or above
UIUserNotificationType allNotificationTypes =
(UIUserNotificationTypeSound | UIUserNotificationTypeAlert | UIUserNotificationTypeBadge);
UIUserNotificationSettings *settings =
[UIUserNotificationSettings settingsForTypes:allNotificationTypes categories:nil];
[[UIApplication sharedApplication] registerUserNotificationSettings:settings];
[[UIApplication sharedApplication] registerForRemoteNotifications];
Upvotes: 0