diff --git a/releases/next/docs/pushnotificationios.html b/releases/next/docs/pushnotificationios.html index a159c6d56b5..2bb43f43f7d 100644 --- a/releases/next/docs/pushnotificationios.html +++ b/releases/next/docs/pushnotificationios.html @@ -20,6 +20,10 @@ and your server-side system. To get an idea, - (void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification { [RCTPushNotificationManager didReceiveLocalNotification:notification]; + } + - (void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error + { + NSLog(@"%@", error); }

Methods #

static presentLocalNotification(details) #

Schedules the localNotification for immediate presentation.

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.
  • applicationIconBadgeNumber (optional) : The number to display as the app’s icon badge. The default value of this property is 0, which means that no badge is displayed.

static scheduleLocalNotification(details) #

Schedules the localNotification for future presentation.

details is an object containing:

  • 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.
  • applicationIconBadgeNumber (optional) : The number to display as the app’s icon badge. Setting the number to 0 removes the icon badge.

static cancelAllLocalNotifications() #

Cancels all scheduled localNotifications

static setApplicationIconBadgeNumber(number) #

Sets the badge number for the app icon on the home screen

static getApplicationIconBadgeNumber(callback) #

Gets the current badge number for the app icon on the home screen

static cancelLocalNotifications(userInfo) #

Cancel local notifications.

Optionally restricts the set of canceled notifications to those notifications whose userInfo fields match the corresponding fields in the userInfo argument.

static getScheduledLocalNotifications(callback) #

Gets the local notifications that are currently scheduled.

static addEventListener(type, handler) #

Attaches a listener to remote or local notification events while the app is running