Push.register() not working for IONIC 2


#1

I have created a sample application in IONIC 2 for push notification services.
My code worked fine for ANDROID and received notifications.
But it didn’t work for iOS. Below are the points on which I focused for iOS.

  • Proper provisonal certification creation and ,p12 .
  • Settings in XCODE
  • Cloud settings in fire cloud messaging .
  • Application settings for iOS in ionic dashboard.

Below is my code.

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 don’t see the alert in iOS devices , but in android I see the token.
Please help me out I am really stuck in this problem.

I followed this tutorial, ran plugin commands correspondingly


#2

Did you find any solution?