Comments (13)
I wish I had the bandwidth to take a look, but maybe it helps to switch to the N7-compatible version (see the top of the repo)? If that doesn't crash then there must be a recent change in that repo which fixes the issue and we can do a simple PR.
Compitable to NS 7+ as well as Downgraded the v 4.2.1, but got same.. :(, and one more issue could not list, listing now, "The Local Notifications plugin allows your app to show notifications when the app is not running. " app unable to show notifications when we kill app just after scheduling, know you don't have bandwidth, but requesting.. :)
from nativescript-local-notifications.
i got this issue too
from nativescript-local-notifications.
I am also seeing this issue. Works when app is running in background. When app is open the app crashes when the notification is supposed to be received. Also on iOS 14
from nativescript-local-notifications.
any updates?
from nativescript-local-notifications.
@EddyVerbruggen I am also having the same issue where iOS crashes if the notification is scheduled and app is in foreground. Is there a work around at the moment for iOS? Thank you.
from nativescript-local-notifications.
@EddyVerbruggen . We are also facing same issue. Any update or any work around?
from nativescript-local-notifications.
@EddyVerbruggen, Please please help on this, this actually big issue with this plugin, coz commonly most of IOS is on 14.0 now and we just lacking the benefit of functionality, please help us.... :(
from nativescript-local-notifications.
I wish I had the bandwidth to take a look, but maybe it helps to switch to the N7-compatible version (see the top of the repo)? If that doesn't crash then there must be a recent change in that repo which fixes the issue and we can do a simple PR.
from nativescript-local-notifications.
@uidhtml I feel you, I've been trying to figure this out all week. I'm having a hard time bc there's no errors/exceptions to go off of. Even debugging in xcode all I got was:
-> 0x10c74bb79: .long 0x01046c30 ; unknown opcode Thread 1: EXC_BAD_ACCESS (code=257, address=0x10c74bb79)
0x10c74bb7d: udf #0x0
0x10c74bb81: cmphs p0.b, p0/z, z0.b, z0.b
0x10c74bb85: stlur x0, [x0]
0x10c74bb89: .long 0x010a78bb ; unknown opcode
0x10c74bb8d: str w0, [x0]
0x10c74bb91: .long 0x010c9d7c ; unknown opcode
0x10c74bb95: str w0, [x0]
The only thing I can think of is that it has something to do with the userNotificationCenterWillPresentNotificationWithCompletionHandler
because that is what gets called when the app is in the foreground.
from nativescript-local-notifications.
from nativescript-local-notifications.
Thanks Uidhtml. I will keep trying also bc I also really need this.
from nativescript-local-notifications.
from nativescript-local-notifications.
@EddyVerbruggen @uidhtml So it appears that userNotificationCenterWillPresentNotificationWithCompletionHandler
really is where the problem is. I narrowed it down to calling completionHandler()
is what crashes the app on iOS. If you don't call it, the app won't crash, but you won't get a notification either. I tried just calling completionHandler(1)
or completionHandler(4)
but it still crashes right away.
@EddyVerbruggen Do you have any ideas why calling completionHandler()
would cause a crash? Thanks!
/**
* Called when the app is in the foreground.
*/
userNotificationCenterWillPresentNotificationWithCompletionHandler(center, notification, completionHandler, next) {
if (notification.request.content.userInfo.valueForKey('__NotificationType') !== 'nativescript-local-notifications' || notification.request.trigger instanceof UNPushNotificationTrigger) {
next();
return;
}
this.receivedInForeground = true;
if (notification.request.content.userInfo.valueForKey('forceShowWhenInForeground') || notification.request.content.userInfo.valueForKey('priority')) {
completionHandler(1 /* Badge */ | 2 /* Sound */ | 4 /* Alert */);
}
else {
completionHandler(1 /* Badge */ | 2 /* Sound */);
}
}
from nativescript-local-notifications.
Related Issues (20)
- Notification touched when app in background, token arrived empty
- New option to pass seconds as input for interval
- Schedule date not working as expected HOT 4
- This notif as music player status. Help me HOT 1
- Callback on after notification triggered. HOT 1
- Its possible to make this notification like when receive a phone call ?
- Show thumbnail on the left HOT 2
- NativeScript 7 Support HOT 1
- Android notification sound HOT 2
- Send and retrieve data on schedule
- Wrong notification time when setting interval
- Why ongoing notifications are removed after clicking on it ? HOT 2
- How to use routing when notification tapped when app is on background?
- Notification icon HOT 2
- Execute function when clicking on Action Button HOT 2
- Notification not showing when app is in background(when app is not running)
- TypeError: Cannot read property 'localnotifications' of undefined
- NativeScript encountered a fatal error: Uncaught TypeError: Class constructor Observable cannot be invoked without 'new' HOT 2
- Receive notification from a server HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nativescript-local-notifications.