Wizcorp / phonegap-plugin-localNotifications

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

Permissions asked before trying to set Notification #31

Closed Antonio-Laguna closed 9 years ago

Antonio-Laguna commented 9 years ago

Hi here!

I've been implementing this plugin into my project and it does work like a charm! Thanks!

Besides this, I'd like to avoid prompting the user to give permission to the app, just on app load. The user doesn't really know why I am requesting that permission and it's likely that some people will just refuse because of that.

Is there any setting to fix this behaviour and ask for permission when trying to set up a notification?

aogilvie commented 9 years ago

If you want you can manually change this code:

Move this section: https://github.com/Wizcorp/phonegap-plugin-localNotifications/blob/master/platforms/ios/HelloCordova/Plugins/LocalNotification/LocalNotification.m#L87-L92

to the top of this function: https://github.com/Wizcorp/phonegap-plugin-localNotifications/blob/master/platforms/ios/HelloCordova/Plugins/LocalNotification/LocalNotification.m#L123

I hope that makes sense.