# FCM and local notifications on iOS

**URL:** <https://forum.ionicframework.com/t/fcm-and-local-notifications-on-ios/127133>\
**Category:** Ionic Native\
**Created:** [April 6, 2018, 2:36pm UTC](https://forum.ionicframework.com/t/fcm-and-local-notifications-on-ios/127133 "2018-04-06T14:36:44Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Skee](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/skee/32/109247_2.png) [@Skee](https://forum.ionicframework.com/u/Skee)\
**Post date:** [April 6, 2018, 2:36pm UTC](https://forum.ionicframework.com/t/fcm-and-local-notifications-on-ios/127133/1 "2018-04-06T14:36:44Z")

</div>

Hi there,  
As i recently discovered, the fcm-plugins and the local-notifications-plugin dont work well together on current iOS versions.  
If i have cordova-plugin-fcm and cordova-plugin-local-notification installed at the same time, the fcm notifications arent recieved in foreground.

This is, what i want to achieve:

- App is in foreground and data-notification comes in -\> raise local notification
- App is in background and data-notification comes in -\> raise local notification
- App is not running at all and data-notification comes in -\> raise local notification

As far as i know at the moment, the last topic is not possible with ionic/cordova and the available plugins.

Bu if i somehow could achieve the first two topics i would be satisfied.  
Is there someone, wo got the first to topics to work on a current project?

Thank you  
Skee

---

<div class="post-metadata">

**Author:** ![Reactor](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/reactor/32/117345_2.png) [@Reactor](https://forum.ionicframework.com/u/Reactor)\
**Post date:** [April 9, 2018, 7:38am UTC](https://forum.ionicframework.com/t/fcm-and-local-notifications-on-ios/127133/2 "2018-04-09T07:38:34Z")

</div>

The same situation and problem! Please help!

---

<div class="post-metadata">

**Author:** ![xenospn](https://avatars.discourse-cdn.com/v4/letter/x/f0a364/32.png) [@xenospn](https://forum.ionicframework.com/u/xenospn)\
**Post date:** [April 9, 2018, 8:19am UTC](https://forum.ionicframework.com/t/fcm-and-local-notifications-on-ios/127133/3 "2018-04-09T08:19:01Z")

</div>

Send a notification to your own token using FCM to simulate a local notification.

---

<div class="post-metadata">

**Author:** ![Reactor](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/reactor/32/117345_2.png) [@Reactor](https://forum.ionicframework.com/u/Reactor)\
**Post date:** [April 9, 2018, 9:40am UTC](https://forum.ionicframework.com/t/fcm-and-local-notifications-on-ios/127133/4 "2018-04-09T09:40:08Z")

</div>

It’s not help with scheduled notifications (for that we use local-notification)

---

<div class="post-metadata">

**Author:** ![Reactor](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/reactor/32/117345_2.png) [@Reactor](https://forum.ionicframework.com/u/Reactor)\
**Post date:** [April 9, 2018, 9:45am UTC](https://forum.ionicframework.com/t/fcm-and-local-notifications-on-ios/127133/5 "2018-04-09T09:45:29Z")

</div>

I have found solution.  
This problem occurred when cordova-plugin-local-notifications v0.9.\* installed.

I have downgrade to 0.8.5 version - now FCM work and Local Notofications work.  
To do this you need remove current ordova-plugin-local-notifications and add plugin from git:  
“[https://github.com/katzer/cordova-plugin-local-notifications.git#0.8.5](https://github.com/katzer/cordova-plugin-local-notifications.git#0.8.5)”

I have create issue on cordova-plugin-local-notifications git repository. Please vote for this issue or comment to attract the attention of the plugin author

> <https://github.com/katzer/cordova-plugin-local-notifications/issues/1572>

---

<div class="post-metadata">

**Author:** ![Reactor](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/reactor/32/117345_2.png) [@Reactor](https://forum.ionicframework.com/u/Reactor)\
**Post date:** [April 9, 2018, 4:44pm UTC](https://forum.ionicframework.com/t/fcm-and-local-notifications-on-ios/127133/6 "2018-04-09T16:44:09Z")

</div>

I have found now solution. I hope it helps for you.

I have installed the lates version of plugin:  
“cordova plugin add [https://github.com/katzer/cordova-plugin-local-notifications.git#0.9.0-beta.3](https://github.com/katzer/cordova-plugin-local-notifications.git#0.9.0-beta.3)”

And reinstall fcm plugin.

Now fcm and local notifications work correctly on iOS and Android

---

<div class="post-metadata">

**Author:** ![Skee](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/skee/32/109247_2.png) [@Skee](https://forum.ionicframework.com/u/Skee)\
**Post date:** [April 9, 2018, 4:48pm UTC](https://forum.ionicframework.com/t/fcm-and-local-notifications-on-ios/127133/7 "2018-04-09T16:48:29Z")

</div>

Hmm, i tried this before, didnt work. Maybe i have to give it another try…

---

<div class="post-metadata">

**Author:** ![Reactor](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/reactor/32/117345_2.png) [@Reactor](https://forum.ionicframework.com/u/Reactor)\
**Post date:** [April 9, 2018, 5:01pm UTC](https://forum.ionicframework.com/t/fcm-and-local-notifications-on-ios/127133/8 "2018-04-09T17:01:25Z")

</div>

I did so many changes for this day.  
I have installed 0.8.4, 0.8.5, 0.9-b2, and now 0.9-b3. I don’t know what operation solve the problem :((  
it’s very annoying

But this is the lates my config.xml:

```auto
<engine name="android" spec="^6.3.0" />
    <engine name="ios" spec="^4.5.4" />
    <engine name="browser" spec="5.0.3" />
    <plugin name="cordova-plugin-splashscreen" spec="^4.1.0" />
    <plugin name="cordova-plugin-whitelist" spec="^1.3.3" />
    <plugin name="ionic-plugin-keyboard" spec="^2.2.1" />
    <plugin name="cordova-sqlite-storage" spec="^2.2.1" />
    <plugin name="cordova-plugin-badge" spec="^0.8.7" />
    <plugin name="phonegap-plugin-push" spec="^2.2.1">
        <variable name="FCM_VERSION" value="11.0.1" />
    </plugin>
    <plugin name="cordova-plugin-screen-orientation" spec="^2.0.2" />
    <plugin name="cordova-plugin-insomnia" spec="^4.3.0" />
    <plugin name="cordova-plugin-flurryanalytics" spec="^1.4.6" />
    <plugin name="cordova-plugin-app-version" spec="^0.1.9" />
    <plugin name="cordova-plugin-inappbrowser" spec="^2.0.2" />
    <plugin name="cordova-plugin-x-socialsharing" spec="^5.3.2" />
    <plugin name="cordova-plugin-device" spec="^1.1.7" />
    <plugin name="cordova-plugin-statusbar" spec="^2.4.1" />
    <plugin name="cordova-plugin-globalization" spec="^1.0.9" />
    <plugin name="cordova-plugin-taptic-engine" spec="^2.1.0" />
    <plugin name="cordova-plugin-inapppurchase" spec="^1.2.0" />
    <plugin name="cordova-clipboard" spec="^1.1.1" />
    <plugin name="cordova-plugin-ionic-webview" spec="^1.1.19" />
    <plugin name="cordova-plugin-fcm" spec="^2.1.2" />
    <plugin name="cordova-plugin-local-notification" spec="git+https://github.com/katzer/cordova-plugin-local-notifications.git#0.9.0-beta.3" />

```

---

<div class="post-metadata">

**Author:** ![Hesters](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/hesters/32/118759_2.png) [@Hesters](https://forum.ionicframework.com/u/Hesters)\
**Post date:** [April 9, 2018, 7:06pm UTC](https://forum.ionicframework.com/t/fcm-and-local-notifications-on-ios/127133/9 "2018-04-09T19:06:02Z")

</div>

You can achieve the third point by using [Ionic Native Push](https://ionicframework.com/docs/native/push/).

---

<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:41pm UTC](https://forum.ionicframework.com/t/fcm-and-local-notifications-on-ios/127133/10 "2021-07-19T21:41:27Z")

</div>

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


