IONIC4 Firebase Push Notification Help Me

Hi Dear,

Developing with Ionic 3, I could not proceed, so I developed the app using Ionic4.

first,

home.page.ts
constructor () {
getPMXToken ();
}

If you do this, it will work on android, but not on iOS.

I would like to know the answer above.

second,

app.component.ts
private notificationSetup () {
this.listenToNotification (). subscribe (
(data) => {
if (this.platform.is (‘ios’)) {
this.presentToast (data.aps.alert);
}
if (this.platform.is (‘android’)) {
this.presentToast (data.body);
}

Push notification works well on android, but push notification does not work on iOS.

I would like the answer to the above.

I attached the source that I changed.

Thank you for your help.

  1. home.page.html
    https://drive.google.com/open?id=19JlhpFmFz0DSAtk5UQ4ir0fuD13PNcmV

  2. home.page.ts
    https://drive.google.com/open?id=1Qg5jbThYzS2i4PHUia3hFPTyKFMo3jBi

  3. app.module.ts
    https://drive.google.com/open?id=1_LWbYckZLYuDnft1zCo8fAym_W1Z2Zes

  4. app.component.ts
    https://drive.google.com/open?id=1iPOl43U5K975oVZ8feBz2RlsLQbnCRI5

1 Like