# FCM "fcm.onNotification().subscribe(data=\>{" not working

**URL:** <https://forum.ionicframework.com/t/fcm-fcm-onnotification-subscribe-data-not-working/122964>\
**Category:** Ionic Native\
**Created:** [February 28, 2018, 10:25am UTC](https://forum.ionicframework.com/t/fcm-fcm-onnotification-subscribe-data-not-working/122964 "2018-02-28T10:25:43Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![nk88saini](https://avatars.discourse-cdn.com/v4/letter/n/eada6e/32.png) [@nk88saini](https://forum.ionicframework.com/u/nk88saini)\
**Post date:** [February 28, 2018, 10:25am UTC](https://forum.ionicframework.com/t/fcm-fcm-onnotification-subscribe-data-not-working/122964/1 "2018-02-28T10:25:43Z")

</div>

Hi,  
I am using FCM plugin its working fine all exist functionality in iOS and android but when I used one more plugin “Local Notifications” so FCM plugin “fcm.onNotification().subscribe(data=\>{” not working in **iOS** but in android working fine.  
Can you help me understand, What problem is there.

Thanks

---

<div class="post-metadata">

**Author:** ![ShineNayLinOo](https://avatars.discourse-cdn.com/v4/letter/s/8c91f0/32.png) [@ShineNayLinOo](https://forum.ionicframework.com/u/ShineNayLinOo)\
**Post date:** [June 23, 2018, 4:05am UTC](https://forum.ionicframework.com/t/fcm-fcm-onnotification-subscribe-data-not-working/122964/2 "2018-06-23T04:05:44Z")

</div>

I think these two can’t be working together. Here I’ve to thank you for this post. I was having problem that **onNotification()** was not triggered in iOS (Android was ok). When I saw your post, I came to realize to remove Local Notification plugin and, now it works for both iOS and Android. And pls share with us if you already found out any solution for using both plugin. That would be useful with some particular use cases in the future. Thank you.

---

<div class="post-metadata">

**Author:** ![Juancarlossc](https://avatars.discourse-cdn.com/v4/letter/j/4491bb/32.png) [@Juancarlossc](https://forum.ionicframework.com/u/Juancarlossc)\
**Post date:** [January 31, 2019, 11:41pm UTC](https://forum.ionicframework.com/t/fcm-fcm-onnotification-subscribe-data-not-working/122964/3 "2019-01-31T23:41:38Z")

</div>

El problema es que los plugins causan un conflicto solo necesita instalar versiones mas antiguas.

```auto
cordova plugin add de.appplant.cordova.plugin.local-notification@0.8.5
npm install --save @ionic-native/local-notifications@4.20.0

```

Fuentes:  
[https://github.com/katzer/cordova-plugin-local-notifications/wiki/03.-Installation](https://github.com/katzer/cordova-plugin-local-notifications/wiki/03.-Installation)  
[npm install --save @ionic-native/local-notifications]  
([http://npm](http://npm) install --save @ionic-native/local-notifications)

---

<div class="post-metadata">

**Author:** ![joe\_c\_sleiman](https://avatars.discourse-cdn.com/v4/letter/j/47e85d/32.png) [@joe\_c\_sleiman](https://forum.ionicframework.com/u/joe_c_sleiman)\
**Post date:** [February 1, 2019, 12:44pm UTC](https://forum.ionicframework.com/t/fcm-fcm-onnotification-subscribe-data-not-working/122964/4 "2019-02-01T12:44:17Z")

</div>

hi i’m using:  
cordova-plugin-fcm-with-dependecy-updated ^2.4.0  
@ionic-native/fcm": "^4.18.0

i was using local-notification too, but i removed it (uninstall it) , and i have in my backend code

```auto
"click_action":"FCM_PLUGIN_ACTIVITY"

```

but still till now iphone when receive notification and tap to it doesn’t redirect me to the specific page and ```  
fcm.onNotification()

```auto
didn't called.
do you know any informations?
```

---

<div class="post-metadata">

**Author:** ![mhartington](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mhartington/32/137757_2.png) [@mhartington](https://forum.ionicframework.com/u/mhartington)\
**Post date:** [July 19, 2021, 9:48pm UTC](https://forum.ionicframework.com/t/fcm-fcm-onnotification-subscribe-data-not-working/122964/5 "2021-07-19T21:48:36Z")

</div>

Closed on July 19, 2021, 9:48pm UTC


