Add support for cancelAllLocalNotifications
Summary: Closes https://github.com/facebook/react-native/pull/2980 Reviewed By: svcscm Differential Revision: D2550080 Pulled By: javache fb-gh-sync-id: 76a7088f4f86191b02e6c176e4a8a7bc85f90835
This commit is contained in:
parent
2608efccb6
commit
da250671e5
|
@ -82,6 +82,13 @@ class PushNotificationIOS {
|
|||
RCTPushNotificationManager.scheduleLocalNotification(details);
|
||||
}
|
||||
|
||||
/**
|
||||
* Cancels all scheduled localNotifications
|
||||
*/
|
||||
static cancelAllLocalNotifications() {
|
||||
RCTPushNotificationManager.cancelAllLocalNotifications();
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the badge number for the app icon on the home screen
|
||||
*/
|
||||
|
|
|
@ -212,10 +212,14 @@ RCT_EXPORT_METHOD(presentLocalNotification:(UILocalNotification *)notification)
|
|||
[RCTSharedApplication() presentLocalNotificationNow:notification];
|
||||
}
|
||||
|
||||
|
||||
RCT_EXPORT_METHOD(scheduleLocalNotification:(UILocalNotification *)notification)
|
||||
{
|
||||
[RCTSharedApplication() scheduleLocalNotification:notification];
|
||||
}
|
||||
|
||||
RCT_EXPORT_METHOD(cancelAllLocalNotifications)
|
||||
{
|
||||
[RCTSharedApplication() cancelAllLocalNotifications];
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
Loading…
Reference in New Issue