diff --git a/docs/pushnotificationios.html b/docs/pushnotificationios.html index 62251507c86..c626b93f72c 100644 --- a/docs/pushnotificationios.html +++ b/docs/pushnotificationios.html @@ -15,7 +15,14 @@ and your server-side system. To get an idea, - (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)notification { [RCTPushNotificationManager didReceiveRemoteNotification:notification]; - }

Methods #

static presentLocalNotification(details: Object) #

Schedules the localNotification for immediate presentation.

details is an object containing:

  • alertBody : The message displayed in the notification alert.
  • soundName : The sound played when the notification is fired (optional).

static scheduleLocalNotification(details: Object) #

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.
  • soundName : The sound played when the notification is fired (optional).

static cancelAllLocalNotifications() #

Cancels all scheduled localNotifications

static setApplicationIconBadgeNumber(number: number) #

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

static getApplicationIconBadgeNumber(callback: Function) #

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

static addEventListener(type: string, handler: Function) #

Attaches a listener to remote notification events while the app is running + } + // Required for the localNotification event. + - (void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification + { + [RCTPushNotificationManager didReceiveLocalNotification:notification]; + }

Methods #

static presentLocalNotification(details: Object) #

Schedules the localNotification for immediate presentation.

details is an object containing:

  • alertBody : The message displayed in the notification alert.
  • soundName : The sound played when the notification is fired (optional).

static scheduleLocalNotification(details: Object) #

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.
  • soundName : The sound played when the notification is fired (optional).
  • userInfo : An optional object containing additional notification data.

static cancelAllLocalNotifications() #

Cancels all scheduled localNotifications

static setApplicationIconBadgeNumber(number: number) #

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

static getApplicationIconBadgeNumber(callback: Function) #

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

static cancelLocalNotifications(userInfo: Object) #

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 addEventListener(type: string, handler: Function) #

Attaches a listener to remote notification events while the app is running in the foreground or the background.

Valid events are:

  • notification : Fired when a remote notification is received. The handler will be invoked with an instance of PushNotificationIOS.
  • register: Fired when the user registers for remote notifications. The handler will be invoked with a hex string representing the deviceToken.

static requestPermissions(permissions?: {