- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
var push = PushNotification.init({
"android": {
"senderID": "mySenderID"
},
"ios": {
"senderID": "mySenderID",
"alert": "true",
"badge": "true",
"sound": "true",
"gcmSandbox": "true"
},
"windows": {}
});
push.on('registration', function(data) {
dispToken = data.registrationId;
});
push.on('notification', function(data) {
console.log(data.message);
alert(data.title+" Message: " +data.message);
// data.title,
// data.count,
// data.sound,
// data.image,
// data.additionalData
});
push.on('error', function(e) {
console.log(e.message);
});
dispToken is the internal variable that I use to save the Token into my database. I have already enabled GCM for iOS on Google. When I push the notification using my PHP page it returns me a JSON with success message. On android it runs flawlessly, but on iOS I never got the push. Any ideas?
PS.: My iOS certificate is a production one. Also, changing gcmSandbox to true or false doesn't make any difference
- Tags:
- HTML5
- Intel® XDK
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I recommend that you review the steps for configuring push notification into your certificate as this might be what you are missing.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Matheus,
I've been experiencing the same problem. Did you have yours solved ? My problem seems to be the certificate. Your problem was the certificate too ?
Thanks in advance,
Antônio Costa
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page