Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

showPushNotificationPermissions second time is always False #32

Open
ivanbatura opened this issue Apr 20, 2016 · 1 comment
Open

showPushNotificationPermissions second time is always False #32

ivanbatura opened this issue Apr 20, 2016 · 1 comment

Comments

@ivanbatura
Copy link

I am using showPushNotificationPermissionsWithType method for a pre-validation of the push notifications.
The first time the method is executed works fine. But if I request again the permission check then, the result is always false.

I changed the
completionHandler((status == ClusterAuthorizationStatusUnDetermined),
to
completionHandler((status == ClusterAuthorizationStatusAuthorized),

and worked for me.

@shanemileham
Copy link

shanemileham commented Apr 26, 2016

It looks like in - (void) showPushNotificationPermissionsWithType:...
the conditionals (status == ClusterAuthorizationStatusAuthorized)
and (status == ClusterAuthorizationStatusUnDetermined) are switched.
It worked for me when I switched them.

I also needed, in + (ClusterAuthorizationStatus) pushNotificationPermissionAuthorizationStatus
to change the return value in iOS8+ else from ClusterAuthorizationStatusDenied
to ClusterAuthorizationStatusUnDetermined.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants