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
Push Notifications #6
Comments
Unfortunately Apple does not provide a way to tell the difference between permission asked and denied vs permission never asked. You will see that explained in the comment below the post you linked: "My answer may not directly answer "how to determine if app is in Notification Center", but it does offer a way to check whether or not the user will receive notifications for your app" Thats why I designed the library to keep track of the deviceID and if it you previously asked and were denied. If you previously obtained permission outside of the library, you can call
With the deviceID you previously obtained, or set the deviceToken to nil and pass in an Error if the user denied permission. Personally, I ask the user again because the only reason it is not set is 1) they haven't set it yet (and have never seen the dialog) or 2) they denied access, in which case I display a dialog that tells them how to enable it in the notification center by calling this method
Hope this helps you decide what to do. Feel free contact Apple about their lacking API. |
OK, I'll just write out what I'll try to do. Maybe it will help someone else who has a similar issue. In the current version of the app I ask for push permissions on I store my deviceToken, (if received in So, to use JLPermissions in the next version, I will ask for push permissions in the appropriate place (after login), like this
|
"Apple does not provide a way to tell the difference between permission asked and denied vs permission never asked" Is this still the case on iOS 8? I think there is now a |
I'm trying to get my head around the push notification part of JLPermissions.
From what I can see
[[JLPermissions sharedInstance] notificationsAuthorized]
will return NO if my app has notifications enabled in a previous version, which didn't use JLPermissions.Should I also check the systems's push notification status ( using this answer on stack overflow http://stackoverflow.com/a/9898632/121646 ) before attempting with either of the
authorizeNotifications
methods?The text was updated successfully, but these errors were encountered: