Skip to content

Commit c7218f0

Browse files
"notRequests" is null not an object on xcode 11 ios 13 #167
1 parent c0b81bf commit c7218f0

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/local-notifications.ios.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -412,8 +412,10 @@ export class LocalNotificationsImpl extends LocalNotificationsCommon implements
412412

413413
if (LocalNotificationsImpl.isUNUserNotificationCenterAvailable()) {
414414
UNUserNotificationCenter.currentNotificationCenter().getPendingNotificationRequestsWithCompletionHandler((notRequests: NSArray<UNNotificationRequest>) => {
415-
for (let i = 0; i < notRequests.count; i++) {
416-
scheduledIds.push(notRequests[i].identifier);
415+
if (notRequests) {
416+
for (let i = 0; i < notRequests.count; i++) {
417+
scheduledIds.push(notRequests[i].identifier);
418+
}
417419
}
418420
resolve(scheduledIds.map(Number));
419421
});

src/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "nativescript-local-notifications",
3-
"version": "4.1.3",
3+
"version": "4.1.4",
44
"description": "The Local Notifications plugin allows your app to show notifications when the app is not running. Just like remote push notifications, but a few orders of magnitude easier to set up.",
55
"main": "local-notifications",
66
"typings": "index.d.ts",

0 commit comments

Comments
 (0)