I have an iOS app with push notifications enabled using following code
if ([application respondsToSelector:@selector(isRegisteredForRemoteNotifications)])
{
// iOS 8 Notifications
[application registerUserNotificationSettings:[UIUserNotificationSettings settingsForTypes:(UIUserNotificationTypeSound | UIUserNotificationTypeAlert | UIUserNotificationTypeBadge) categories:nil]];
[application registerForRemoteNotifications];
}
else
{
// iOS < 8 Notifications
[application registerForRemoteNotificationTypes:
(UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeAlert | UIRemoteNotificationTypeSound)];
}
When this app is run on iOS9 device it asks for permissions in the beginning just fine, but when used on iOS7 , iPhone 4 it doesn't ask for permissions but it receives the notifications just fine, not able to understand the issue.
Seeing as your user is receiving the push notifications despite not being presented a permission dialogue, following must be the scenario:
According to Apple Technical Note 2265:
The first time a push-enabled app registers for push notifications, iOS asks the user if they wish to receive notifications for that app. Once the user has responded to this alert it is not presented again unless the device is restored or the app has been uninstalled for at least a day.
If you want to simulate a first-time run of your app, you can leave the app uninstalled for a day. You can achieve the latter without actually waiting a day by following these steps:
Delete your app from the device. Turn the device off completely and turn it back on. Go to Settings > General > Date & Time and set the date ahead a day or more. Turn the device off completely again and turn it back on
If you ask your user to check for app specific permissions in settings menu, He will certainly see the Push permissions. Otherwise he would not have been receiving push notifications at all.