Why do I need to register device to developer.itune for push notification iOS?


#1

Using IONIC 2

Recently I have tested ionic push notification service with Android.
Now I am trying same with iOS
while reading document https://docs.ionic.io/services/profiles/#device-registration
I found that I need to register my iPhone, but if I have done with all the other processes like bundleidentifer,
push notification SSL certification etc. then why I need to register my device ? it means I need to register all devices , if I wanted to send push notification to multiple devices?


#2

Devices must be explicitly registered with Apple for sending push notifications during development.

See my emphasis.


#3

Does it mean that I will get notification only on those devices which I have registered in developer.itune?
Can you please tell me the steps for production?


#4

Yes, for development versions of the app that is the way to go.
For production you follow the documentation.


#5

Thanks for informing me. As I am new can you please help me out to get things working. Below is my code in ionic 2 component
export class HomePage {

"constructor(public navCtrl: NavController,public push: Push) {
alert(“home”);
this.push.register().then((t: PushToken) => {
return this.push.saveToken(t);
}).then((t: PushToken) => {
alert("Token is "+t.token
)
console.log(‘Token saved:’, t.token);
});
this.push.rx.notification()
.subscribe((msg) => {
alert(msg.title + ': ’ + msg.text);
});
}

}"

I get first alert but I do not get the alert under register method. Can you pls help me out where I could be wrong.
Or how to check the error here?
Thanks


#6

Please create a new topic for this as this is now a totally different question and problem. I and others will then take a look at it. (Plase make sure you format your code using the </> button) Thank you.