Did you checked in settings that Push notification are set to "ON"?
And another thing push notification can only received in Real devices not in Simulators.
You can send push notification from simulator (Because it is just a web service call.).
-- UPDATE --
The below code that requests for notifications.
Write in appDelegate.m (didFinishLaunchingWithOptions:)
if ([application respondsToSelector:@selector(registerUserNotificationSettings:)]) {
NSLog(@"Requesting permission for push notifications..."); // iOS 8
UIUserNotificationSettings *settings = [UIUserNotificationSettings settingsForTypes: UIUserNotificationTypeAlert | UIUserNotificationTypeBadge |
UIUserNotificationTypeSound categories:nil];
[UIApplication.sharedApplication registerUserNotificationSettings:settings];
}
else {
NSLog(@"Registering device for push notifications..."); // iOS 7 and earlier
[UIApplication.sharedApplication registerForRemoteNotificationTypes: UIRemoteNotificationTypeAlert | UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound];
}
Update below methods in you appDelegate.m
- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
// Store DeviceToken some way like in NSUserDefault (if needed to pass device token)
// Write alert for success to register for push
}
- (void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error {
// Write alert for failed to register for push
}
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo {
// Write alert code that shows you have successfully received alert
// after that maintain your push
}