diff --git a/Libraries/PushNotificationIOS/PushNotificationIOS.js b/Libraries/PushNotificationIOS/PushNotificationIOS.js index a4adace18..c93f644a4 100644 --- a/Libraries/PushNotificationIOS/PushNotificationIOS.js +++ b/Libraries/PushNotificationIOS/PushNotificationIOS.js @@ -79,7 +79,10 @@ class PushNotificationIOS { * details is an object containing: * * - `alertBody` : The message displayed in the notification alert. + * - `alertAction` : The "action" displayed beneath an actionable notification. Defaults to "view"; * - `soundName` : The sound played when the notification is fired (optional). + * - `category` : The category of this notification, required for actionable notifications (optional). + * - `userInfo` : An optional object containing additional notification data. */ static presentLocalNotification(details: Object) { RCTPushNotificationManager.presentLocalNotification(details); @@ -92,7 +95,9 @@ class PushNotificationIOS { * * - `fireDate` : The date and time when the system should deliver the notification. * - `alertBody` : The message displayed in the notification alert. + * - `alertAction` : The "action" displayed beneath an actionable notification. Defaults to "view"; * - `soundName` : The sound played when the notification is fired (optional). + * - `category` : The category of this notification, required for actionable notifications (optional). * - `userInfo` : An optional object containing additional notification data. */ static scheduleLocalNotification(details: Object) { diff --git a/Libraries/PushNotificationIOS/RCTPushNotificationManager.m b/Libraries/PushNotificationIOS/RCTPushNotificationManager.m index e9c68a5ec..86c9a37ad 100644 --- a/Libraries/PushNotificationIOS/RCTPushNotificationManager.m +++ b/Libraries/PushNotificationIOS/RCTPushNotificationManager.m @@ -36,8 +36,10 @@ NSString *const RCTRemoteNotificationsRegistered = @"RemoteNotificationsRegister UILocalNotification *notification = [UILocalNotification new]; notification.fireDate = [RCTConvert NSDate:details[@"fireDate"]] ?: [NSDate date]; notification.alertBody = [RCTConvert NSString:details[@"alertBody"]]; + notification.alertAction = [RCTConvert NSString:details[@"alertAction"]]; notification.soundName = [RCTConvert NSString:details[@"soundName"]] ?: UILocalNotificationDefaultSoundName; notification.userInfo = [RCTConvert NSDictionary:details[@"userInfo"]]; + notification.category = [RCTConvert NSString:details[@"category"]]; return notification; }