firebase.getAPNSToken

please check I’m building an ionic application and I’l stuck since 2 weeks
I’m I wron with this function to get token ??
I made everything in firebase console

askNotificationPermission(){

      if (this.platform.is('ios')) {
    this.firebase.grantPermission().then(hasPermission => console.log(hasPermission ? 'granted' : 'denied'));

    this.firebase.onApnsTokenReceived().subscribe(token => {
      const deviceData = {
        reg_id: token,
        os: this.device.platform
      };
      this.services.device_data = deviceData;
      localStorage.setItem('deviceData', JSON.stringify(deviceData));
    });
}

  }

Is this in pwa? Ios dus not support notifications in pwa. If that is your use case

No it’s not a pwa it’s a simple ionic cordova application and it is working in Android but I cannot get the token apns for notification