katzer / cordova-plugin-local-notifications

Cordova Local-Notification Plugin
Apache License 2.0
2.56k stars 1.75k forks source link

Not working in cordova 3.3.0 iOS #96

Closed vepak closed 10 years ago

vepak commented 10 years ago

I'm trying to get the plugin work in cordova 3.3.0 iOS. I installed plugin using cmd cordova plugin add de.appplant.cordova.plugin.local-notification

and built the project cordova build ios

and then trying to execute window.plugin.notification.local.add({ message: 'Great app!' });

But nothing show up. Do in need to initialize anything or missing anything.

Appreciate your time.

Thanks, Vamsi.

gtoto007 commented 10 years ago

I confirm! I too have the same problem!

c-rahtz commented 10 years ago

I just started using this plugin a week or so ago, so I don't have a lot of experience. But I was confused by the same thing starting out. I could not get the immediate notification to fire as you're trying to do here and as is described in the README. However, if you set it to fire sometime in the future (just use a minute from now to start), then back out of the app using the home button (shift-cmd-h in the iOS simulator), you should see a notification pop up within the minute. Maybe it only works in the background?

vepak commented 10 years ago

Yes @c-rahtz , you're correct. I could see the notification once I excited the app.

Appreciate your help. May be something @katzer want to take a look at it.

Great plugin & great support.

vepak commented 10 years ago

wondering how to show the notification in foreground, like alarm alert.

gtoto007 commented 10 years ago

I followed your advice and it works. Thank you

katzer commented 10 years ago

Hello,

the fact that the notification is not displayed while in foreground is controlled by the OS. The notification only pops up if the app is not running (or in background). But she will be listed in the notification center in each case.

It may be possible for future releases (v0.8) to add support for toasts or alarms while running in foreground.