Hello, I setup normally and apparently it's all right but no notification is delivered.

Console (xcode):

2014-06-26 18:45:58.156 PodePedir[3065:60b] Initializing application: (null), (null) 2014-06-26 18:45:59.049 PodePedir[3065:60b] Multi-tasking -> Device: YES, App: YES 2014-06-26 18:45:59.134 PodePedir[3065:60b] Unlimited access to network resources 2014-06-26 18:45:59.152 PodePedir[3065:60b]

Started backup to iCloud! Please be careful. Your application might rejected by Apple if you store too much data. For more information please read "iOS Data Storage Guidelines" You could find it at the following address https://developer.apple.com/icloud/documentation/data-storage/ .

2014-06-26 18:45:59.475 PodePedir[3065:60b] [CDVTimer][statusbar] 136.502028ms 2014-06-26 18:45:59.477 PodePedir[3065:60b] [CDVTimer][TotalPluginStartup] 138.118982ms 2014-06-26 18:46:00.513 PodePedir[3065:60b] Resetting plugins due to page load. 2014-06-26 18:46:01.938 PodePedir[3065:60b] Finished load of: file:///var/mobile/Applications/C5FB2C03-6DA8-4389-986B-AFB6C132BB6E/PodePedir.app/www/index.html

asked 26 Jun '14, 22:23
lucianosavio's gravatar image

lucianosavio
112

my js file:

document.addEventListener("deviceready", function() { StatusBar.overlaysWebView(false); initPushwoosh(); });

document.addEventListener('push-notification', function(event) { var notification = event.notification; alert(notification.aps.alert); pushNotification.setApplicationIconBadgeNumber(0); });

function initPushwoosh() {

var pushNotification = window.plugins.pushNotification;

//set push notification callback before we initialize the plugin
document.addEventListener('push-notification', function(event) {
                   ]
                            //get the notification payload
                            var notification = event.notification;

                            //display alert to the user for example
                            alert(notification.aps.alert);

                            //clear the app badge
                            pushNotification.setApplicationIconBadgeNumber(0);
                        });

//initialize the plugin
pushNotification.onDeviceReady({pw_appid:"27FAC-FB813"});

//register for pushes
pushNotification.registerDevice(
    function(status) {
        var deviceToken = status['deviceToken'];
        console.warn('registerDevice: ' + deviceToken);
    },
    function(status) {
        console.warn('failed to register : ' + JSON.stringify(status));
        alert(JSON.stringify(['failed to register ', status]));
    }
);
permanent link
answered 26 Jun '14, 22:28
lucianosavio's gravatar image

lucianosavio
112

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×352
×165
×111

question asked: 26 Jun '14, 22:23

question was seen: 1,505 times

last updated: 26 Jun '14, 22:28