Local notification delivering on same time iOS, IONIC 2


#1

I scheduled local notification in iOS with 5 sec delay in each notification.
But they deliver after 2, 3 minutes simultaneously all.
Please provide me the solution

var d = new Date();
d.setSeconds(d.getSeconds() + 5);

this.localNotifications.schedule({
id: 2,
text: ‘Hi Test 2’,
at: d
});
d.setSeconds(d.getSeconds() + 5);
this.localNotifications.schedule({
id: 3,
text: ‘Hi Test 3’,
at: d
});
d.setSeconds(d.getSeconds() +5);
this.localNotifications.schedule({
id: 4,
text: ‘Hi Test 4’,
at: d
});


#2

console.log(d) before you schedule and see if the values are correct.


#3

Checked. As you can see I am using simple new Date(). won’t give wrong value


#4

What actually happening is

id 2 message deliver on time.
id 3 and 4 deliver together