-
Notifications
You must be signed in to change notification settings - Fork 996
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
iOS: Callbacks not executing when user selects "Don't Allow" #162
Comments
I confirm this issue..... Please fix this |
for my debugging, you can view this topic that I've added a short time ago: |
new issue ticket #164 |
My apps are getting rejected by Apple. because when user clicks "Don't Allow", my callback that loads the app (From external website) never executes and the app never loads the content. This is really critical. Is there an update on the fix? Thanks a lot. |
I can confirm that if either the "Don't Allow" was selected or the "Alert Type" for the app in Notification Center is set to "None" that the registration method "hangs" and doesn't call either success or error callback. |
Found a horrible, hacky workaround for this: some_global = false;
function onNotificationAPN() {}
function tokenHandler(reg_id) {
some_global = true;
// Proceed as normal with our registration id
}
function errorHandler(error) {
if(some_global === false) {
// Here we assume there was an error with registration,
// and proceed with our app execution under that assumption
}
}
document.addEventListener('deviceready', function() {
pushNotification.register(tokenHandler, errorHandler, {
"badge":"false",
"sound":"true",
"alert":"true",
"ecb":"onNotificationAPN"
});
// We assume that if the register callback hasn't happened
// within 2 seconds, there must have been some error.
setTimeout(errorHandler, 2000);
}, false); If you have even a shred of self respect or dignity, you won't use this kludge. Fortunately for me I have neither, so this will work for now. |
Have the same problem with ios7. Anyone with a proper solution? Luckily i have no self respect and will use the timeout solution. |
bumb! phonegap is useless without fixing essential bugs !! @adobe |
+1 (app rejected because of this) |
this is very useful to show alerts for users when they disabled notifications, please implement |
Is it fixed ? Thanks |
bug is still there |
+1 (serioudly app rejected because of this ) |
+1 (app rejected because of this). This is not limited to iOS. On android, If a user doesn't have GCM installed or disabled, the app hangs too, error callback isn't called. Any plans to fix this? |
+1 same issue here... would be very thankful for a fix! |
Is there any fix available yet? |
+1 same issue. |
+1 big issue |
Hi, I created this pull request for this issue. It solves the problem for iOS8 and higher. |
👍 |
We were unable to get the success or error callbacks in register() to execute if an iOS 7 user opted to not allow push notifications. We tried using Cordova 3.3.1-0.1.2, 3.3.0-rc.1, and 3.4.0-rc.1 with the latest version of PushPlugin. We were definitely calling window.plugins.pushNotification.register() with the correct args -- no errors in PushNotification.js -- but it never called back from the cordova.exec in PushNotification.js.
Thank you for all your hard work on this plugin!
The text was updated successfully, but these errors were encountered: