Skip to content
This repository has been archived by the owner on Sep 4, 2020. It is now read-only.

Cannot register on iOS #30

Closed
martinfilliau opened this issue Jul 10, 2015 · 6 comments
Closed

Cannot register on iOS #30

martinfilliau opened this issue Jul 10, 2015 · 6 comments

Comments

@martinfilliau
Copy link

I've tried the code below on two different iPhone running iOS 8.4 and the error callback is always called twice, with the value being constantly {}.

The code runs after deviceready is fired, and works fine on Android.

var plugin = PushNotification.init({ "android": {"senderID": "XX"},
                       "ios": {'badge': true, 'sound': true, 'alert': true}});

plugin.on('registration', function (data) {
  alert("Registration: " + JSON.stringify(data));
});

plugin.on('notification', function (data) {
  alert("Notification: " + JSON.stringify(data));
});

plugin.on('error', function (e) {
  alert("Error: " + JSON.stringify(e));
 });

Any idea what could possibly be wrong?

@boboldehampsink
Copy link

You should use a development certificate with push capabilities when you build

@martinfilliau
Copy link
Author

The certificate is supposed to have push capabilities, but I'll double check.

@boboldehampsink
Copy link

Make sure your project is set to use this certificate when building

@macdonst
Copy link
Member

@martinfilliau I can't reproduce this. As @boboldehampsink mentions it is probably due to a cert issue with iOS. Gawd knows I struggle with those certs :)

@martinfilliau
Copy link
Author

Yep we were indeed using the wrong certificate...
Thanks for the fast reply!

@lock
Copy link

lock bot commented Jun 5, 2018

This thread has been automatically locked.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 5, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

3 participants