Skip to content

Commit 323b73f

Browse files
authored
Add badge and sound to UNNotification and UNNotificationRequest formatters (#237)
1 parent d39b2dd commit 323b73f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ios/RNCPushNotificationIOS.m

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,8 @@ @implementation RNCPushNotificationIOS
233233
formattedNotification[@"title"] = RCTNullIfNil(content.title);
234234
formattedNotification[@"subtitle"] = RCTNullIfNil(content.subtitle);
235235
formattedNotification[@"body"] = RCTNullIfNil(content.body);
236+
formattedNotification[@"badge"] = RCTNullIfNil(content.badge);
237+
formattedNotification[@"sound"] = RCTNullIfNil(content.sound);
236238
formattedNotification[@"category"] = RCTNullIfNil(content.categoryIdentifier);
237239
formattedNotification[@"thread-id"] = RCTNullIfNil(content.threadIdentifier);
238240
formattedNotification[@"userInfo"] = RCTNullIfNil(RCTJSONClean(content.userInfo));
@@ -250,6 +252,8 @@ @implementation RNCPushNotificationIOS
250252
formattedRequest[@"title"] = RCTNullIfNil(content.title);
251253
formattedRequest[@"subtitle"] = RCTNullIfNil(content.subtitle);
252254
formattedRequest[@"body"] = RCTNullIfNil(content.body);
255+
formattedRequest[@"badge"] = RCTNullIfNil(content.badge);
256+
formattedRequest[@"sound"] = RCTNullIfNil(content.sound);
253257
formattedRequest[@"category"] = RCTNullIfNil(content.categoryIdentifier);
254258
formattedRequest[@"thread-id"] = RCTNullIfNil(content.threadIdentifier);
255259
formattedRequest[@"userInfo"] = RCTNullIfNil(RCTJSONClean(content.userInfo));

0 commit comments

Comments
 (0)