I can check if user granted notification (alert) permission or not before iOS8 like that:

```
UIRemoteNotificationType types = [[UIApplication sharedApplication] enabledRemoteNotificationTypes];
if (types & UIRemoteNotificationTypeAlert)
{
    //user granted
}

```

it is not working on iOS8, it says: 

```
iOS (3.0 and later) Deprecated:Register for user notification settings using the  registerUserNotificationSettings: method instead.

```

console says: 

```
enabledRemoteNotificationTypes is not supported in iOS 8.0 and later.

```

so how can I check it on iOS 8?