permissionData.permission === 'denied' without interaction



1 comment

  • Avatar
    Frank Bravo

    Seems there were a few things going on.

    First, there is an error in the code on this page ( The correct code is:

    // Safari push notifications
    var checkRemotePermission = function (permissionData) {
        if (permissionData.permission === 'default') {
            console.log('This is a new web service URL and its validity is unknown.');
                '', // Pushwoosh web service endpoint URL, without slash
                '', // Your unique reverse-domain Website Push ID from the Developer Center, starts with "web."
                { application:'xxxxx-xxxxx'},  // Your Pushwoosh application code from the Control Panel
                checkRemotePermission  // The callback function.
        } else if (permissionData.permission === 'denied') {
            console.log('The user said no.');
        } else if (permissionData.permission === 'granted') {
            console.log('The web service URL is a valid push provider, and the user said yes.');
            // permissionData.deviceToken is now available to use.
    // Ensure that the user can receive Safari Push Notifications
    window.onload = function(){
        if ('safari' in window && 'pushNotification' in window.safari) {
            var permissionData = window.safari.pushNotification.permission(''); // Your Website Push ID
        } else {
            console.log('Push Notifications are available for Safari browser only');

    Second, there was an issue with the Pushwoosh backend. They located a bug that resulted in Safari pushes not working properly during registration. The developers fixed the bug this morning, and everything worked.

Please sign in to leave a comment.