Wizcorp / phonegap-plugin-localNotifications

PhoneGap plugin for providing native local notification system to JavaScript.
MIT License
38 stars 29 forks source link

Launch is undefined under iOS #15

Closed jValdron closed 9 years ago

jValdron commented 10 years ago

I'm trying to implement the launch callback, so that I can redirect the user to the proper page when he receives a notification, however, the launch function doesn't seem to exist, even in the plugin file it doesn't declare it. Is there an event I can use or something?

I get the following error: TypeError: 'undefined' is not a function (evaluating 'localNotification.launch')
aogilvie commented 9 years ago

Sorry the documentation is wrong I think. Please use: document.addEventListener("receivedLocalNotification", onReceivedLocalNotification, false);

aogilvie commented 9 years ago

I've added example project. Here is the example project sample code: https://github.com/Wizcorp/phonegap-plugin-localNotifications/blob/master/platforms/ios/www/index.html#L342