From 80176c528ee2afd7d7367d7144d53ba1807029fa Mon Sep 17 00:00:00 2001 From: jcesarmobile Date: Tue, 26 Jan 2021 18:05:47 +0100 Subject: [PATCH] add missing ints --- local-notifications/README.md | 2 +- local-notifications/ios/Plugin/LocalNotificationsHandler.swift | 2 +- local-notifications/ios/Plugin/LocalNotificationsPlugin.swift | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/local-notifications/README.md b/local-notifications/README.md index b9256806c..d22dd51ce 100644 --- a/local-notifications/README.md +++ b/local-notifications/README.md @@ -273,7 +273,7 @@ The object that describes a local notification. | Prop | Type | Description | Since | | -------- | ------------------- | ---------------------------- | ----- | -| **`id`** | string | The notification identifier. | 1.0.0 | +| **`id`** | number | The notification identifier. | 1.0.0 | #### ScheduleOptions diff --git a/local-notifications/ios/Plugin/LocalNotificationsHandler.swift b/local-notifications/ios/Plugin/LocalNotificationsHandler.swift index 427a5d5bf..a8a4b95d7 100644 --- a/local-notifications/ios/Plugin/LocalNotificationsHandler.swift +++ b/local-notifications/ios/Plugin/LocalNotificationsHandler.swift @@ -75,7 +75,7 @@ public class LocalNotificationsHandler: NSObject, NotificationHandlerProtocol { func makeNotificationRequestJSObject(_ request: UNNotificationRequest) -> JSObject { let notificationRequest = notificationRequestLookup[request.identifier] ?? [:] return [ - "id": request.identifier, + "id": Int(request.identifier) ?? -1, "title": request.content.title, "sound": notificationRequest["sound"] ?? "", "body": request.content.body, diff --git a/local-notifications/ios/Plugin/LocalNotificationsPlugin.swift b/local-notifications/ios/Plugin/LocalNotificationsPlugin.swift index 83062ec25..1ee6e437b 100644 --- a/local-notifications/ios/Plugin/LocalNotificationsPlugin.swift +++ b/local-notifications/ios/Plugin/LocalNotificationsPlugin.swift @@ -88,7 +88,7 @@ public class LocalNotificationsPlugin: CAPPlugin { let ret = ids.map({ (id) -> JSObject in return [ - "id": id + "id": Int(id) ?? -1 ] }) call.resolve([