Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iPad specific error when scheduling local notification #116

Open
boldham31 opened this issue Sep 21, 2018 · 3 comments
Open

iPad specific error when scheduling local notification #116

boldham31 opened this issue Sep 21, 2018 · 3 comments

Comments

@boldham31
Copy link

I was testing nativescript-local-notifications on an iPad Air with iOS 9.0.2 and I received an Error: setObjectForKey: object cannot be null javascript error when I tried to call the LocalNotifications.schedule function in my application. When I investigated further, it was throwing an error in local-notifications.js specifically around the interval parameter, saying that it can't be null. Once I added the interval parameter back in it worked.

In the README, it states that every schedule parameter is optional, but the error highlighted the interval option and the app would crash whenever it wasn't set. I ran my application on an android phone, android tablet, and an iPhone and each one of them ran with no issues when I didn't have interval set.

@EddyVerbruggen
Copy link
Owner

Hi, I'm guessing it has to do with the old iOS version running on your iPad. Can you confirm the iPhone is running iOS 10 or higher? That's hitting different code.

If you want to point out flaws on specific lines in the sourcecode then please do, by linking to the relevant lines. And if you want to try to fix it, you can edit the relevant file in node_modules/nativecsript-local-notifications.

@boldham31
Copy link
Author

The iPhone is running iOS 11, so you're right I think it has to do with the deprecated version of iOS. Thanks for the help

@boldham31
Copy link
Author

I'll take a look at the source code as well to see if I can be of any help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants