# Local Notification not firing receivedMessage event from closed app state

**URL:** <https://forums.fusetools.com/t/local-notification-not-firing-receivedmessage-event-from-closed-app-state/5525>\
**Category:** Bug Reports\
**Created:** [January 22, 2018, 10:47pm UTC](https://forums.fusetools.com/t/local-notification-not-firing-receivedmessage-event-from-closed-app-state/5525 "2018-01-22T22:47:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![aeq](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/aeq/32/129_2.png) [@aeq](https://forums.fusetools.com/u/aeq)\
**Post date:** [January 22, 2018, 10:47pm UTC](https://forums.fusetools.com/t/local-notification-not-firing-receivedmessage-event-from-closed-app-state/5525/1 "2018-01-22T22:47:11Z")

</div>

Fuse: 1.5  
OS: Sierra

Steps

1. fuse build --target=iOS -adebug

2. Run on iPhone (tested with a 5)

3. Tap “send notification in 5 seconds”

4. Close App

5. Tap notification

6. receivedMessage is not fired and therefore “Received Local Notification” is not added to the log

> “This function is called whenever a notification is delivered while the app is open, or **when the app is started from a notification the user has selected.** ”[[Fuse](https://www.fusetools.com/docs/fuse/localnotifications/localnotify)]

If there’s something I’m missing, please let me know, thanks.

```auto
<App>
    <JavaScript>
	var LocalNotify = require("FuseJS/LocalNotifications");
	var Observable = require('FuseJS/Observable');

	var delay = 5;
	var log = Observable();

	function hello() {
		log.add('hello');
	}

	LocalNotify.on("receivedMessage", function(payload) {
		// console.log("Received Local Notification: " + payload);
		log.add('Received Local Notification');

		// LocalNotify.clearAllNotifications();
	});

	hello();

	function sendLater() {
		LocalNotify.later(delay, "Finally!", delay + " seconds is a long time", "hmm?", true);
	}

	function sendNow() {
		LocalNotify.now("Boom!", "Just like that", "payload", true);
	}

	module.exports = {
		delay: delay,
		log: log,
		sendNow: sendNow,
		sendLater: sendLater
	};

    </JavaScript>
    <DockPanel>
        <TopFrameBackground DockPanel.Dock="Top" />
        <ScrollView>
            <StackPanel>
                <Button Clicked="{sendNow}" Text="Send notification now" Height="60"/>
                <Button Clicked="{sendLater}" Text="Send notification in {delay} seconds" Height="60"/>
                <Each Items="{log}">
                  <Text Value="{}" Alignment="Center" />
                </Each>
            </StackPanel>
        </ScrollView>
        <BottomBarBackground DockPanel.Dock="Bottom" />
    </DockPanel>
</App>

```

---

<div class="post-metadata">

**Author:** ![petterroea](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/petterroea/32/438_2.png) [@petterroea](https://forums.fusetools.com/u/petterroea)\
**Post date:** [January 23, 2018, 11:40am UTC](https://forums.fusetools.com/t/local-notification-not-firing-receivedmessage-event-from-closed-app-state/5525/2 "2018-01-23T11:40:43Z")

</div>

Hello, can you provide the OS version of your iPhone?

In the mean time, i have created [a ticket](https://github.com/fusetools/fuselibs-public/issues/960) on this.

---

<div class="post-metadata">

**Author:** ![aeq](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/aeq/32/129_2.png) [@aeq](https://forums.fusetools.com/u/aeq)\
**Post date:** [January 23, 2018, 4:29pm UTC](https://forums.fusetools.com/t/local-notification-not-firing-receivedmessage-event-from-closed-app-state/5525/3 "2018-01-23T16:29:20Z")

</div>

Hey Liam, tested on an iPhone 5 its 10.3.3. Side note: iPhone 5 can’t upgrade to iOS 11.
