katzer / cordova-plugin-local-notifications

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

Unable to receive local notification on ios 10 #1024

Closed sparsh0611 closed 7 years ago

sparsh0611 commented 8 years ago

The local notifications are working fine on iOS 9 and lower versions. But, in iOS 10 (beta version), no local notification is received. There's no error while scheduling it and 'schedule' method in APPLocalNotification.m runs without error. But, the notification doesn't get fired.

ghost commented 8 years ago

Can you send me the code for ios 9. I have issue in ios 9.

NorthMcCormick commented 8 years ago

I have the same issue. I think it's specifically an iOS 10 beta bug :(

NorthMcCormick commented 8 years ago

Beta 2 still has the same issue if anyone is wondering

jokiamo commented 8 years ago

Important:UILocalNotification is deprecated in iOS 10. Use UNNotificationRequest instead. A UILocalNotification object specifies a notification that an app can schedule for presentation at a specific date and time.

NorthMcCormick commented 8 years ago

Gah I scoured the docs and didn't see that. So basically this plugin is totally useless at this point? Or do the APIs line up pretty well?

Any recommendations for other plugins guys?

swamy470 commented 8 years ago

sparsh0611 can you please send me the iOS9 code.

sparsh0611 commented 8 years ago

@gandhiselvarj @swamy470 Here is my working iOS 9 code. But, it won't work in iOS 10 because of deprecation, as mentioned above .

Schedule notification: cordova.plugins.notification.local.schedule({ id: 1, title: 'title', at: alarmTime, });

On notification receive: (in app.js) $rootScope.$on('$cordovaPush:notificationReceived', function (event, notification) { if (notification.alert) { navigator.notification.alert(notification.alert); } });

jokiamo commented 8 years ago

https://github.com/jokiamo/cordova-plugin-local-notifications

malloc32 commented 8 years ago

For me this update does not work properly, see this post if you have problems too. post

kishorekumarek commented 8 years ago

Deprecation doesn't mean that it wont work, isn't it? I too face the problem. I think the way iOS handled localNotifications have changed that's why it affects UILocalNotifications. #pureAssumptions

rwillett commented 7 years ago

Is this still an issue? Its over six months old. It also refers to a Beta of IOS10.

We have IOS10 working.

rwillett commented 7 years ago

The code does work in IOS10. Suspect this is an issue with Beta version of IOS10.

Now closed as no update from original poster.