Local Notification plug-in with Ionic 1.3 on iOS - something funky going on!

Hi there,

I am looking for help with an issue I am having using the Local Notification plug-in. On Android the plug-in works fine. On iOS (device or emulator) I cannot get a notification to fire. With the simplest logic:

$cordovaLocalNotification.schedule({
id: 1,
title: “Remind me now”,
text: “Instant reminder”
}).then(function() {
// Log something
});

Running on Android this works.

Running on iOS (9.3 on emulator, 9.3.3. on device) I get the pop-up asking for permission which I grant. Then nothing.

If I look at the logs I see something interesting:

UILocalNotification: could not calculate next fire date - previous = (date) : next = (same date) : repeatInterval = 2

The interesting this is that the dates shown is 1 hour behind the local date/time (we are on GMT+1 currently)!! If I show the date and time on the App it is correct. Something is messing with the date before it gets the native code.

Any ideas?

Latest version of Local Notification plug-in, plus:

Cordoval CLI 6.3.0
Ionic 1.3
Node 4.4.7

Not sure what else is relevant.

Solved. The date issue is just a date formatting issue in the trace log. I am GMT+1 but the logger is obviously formatting at GMT. This led me down quite a rat hole!

So… the problem with setting an instant notification on iOS is that it doesn’t show when the App is running in the foreground. So I added a minute to the time set and went to the home screen.

It works :slight_smile: