Local Notification not firing receivedMessage event from closed app state

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]

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

<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>

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

In the mean time, i have created a ticket on this.

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