You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+41-6Lines changed: 41 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -326,7 +326,6 @@ Example:
326
326
let localNotification =NotificationsIOS.localNotification({
327
327
alertBody:"Local notificiation!",
328
328
alertTitle:"Local Notification Title",
329
-
alertAction:"Click here to open",
330
329
soundName:"chime.aiff",
331
330
category:"SOME_CATEGORY",
332
331
userInfo: { }
@@ -338,7 +337,7 @@ Notification object contains:
338
337
-**`fireDate`**-The date and time when the system should deliver the notification (optinal -default is immidiate dispatch).
339
338
- `alertBody`-The message displayed in the notification alert.
340
339
- `alertTitle`-The title of the notification, displayed in the notifications center.
341
-
- `alertAction`-The"action" displayed beneath an actionable notification.
340
+
- `alertAction`-The"action" displayed beneath an actionable notification on the lockscreen (e.g. "Slide to **open**").Note that Apple no longer shows this in iOS 10.
342
341
- `soundName`-The sound played when the notification is fired (optional).
343
342
- `category`-The category of this notification, required for [interactive notifications](#interactive--actionable-notifications-ios-only) (optional).
Upon notification opening (tapping by the device user), all data fields will be delivered as-is).
359
358
360
-
### CancelLocalNotification
361
-
The `NotificationsIOS.localNotification()` and `NotificationsAndroid.localNotification()` methods return unique `notificationId` values, which can be used in order to cancel specific local notifications. You can cancel local notification by calling `NotificationsIOS.cancelLocalNotification(notificationId)` or `NotificationsAndroid.cancelLocalNotification(notificationId)`.
359
+
### CancelScheduledLocalNotifications
360
+
361
+
The `NotificationsIOS.localNotification()` and `NotificationsAndroid.localNotification()` methods return unique `notificationId` values, which can be used in order to cancel specific local notifications that were scheduled for delivery on `fireDate` and have not yet been delivered. You can cancel local notification by calling `NotificationsIOS.cancelLocalNotification(notificationId)` or `NotificationsAndroid.cancelLocalNotification(notificationId)`.
362
362
363
363
Example (iOS):
364
364
365
365
```javascript
366
366
let someLocalNotification =NotificationsIOS.localNotification({
367
367
alertBody:"Local notificiation!",
368
368
alertTitle:"Local Notification Title",
369
-
alertAction:"Click here to open",
370
369
soundName:"chime.aiff",
371
370
category:"SOME_CATEGORY",
372
371
userInfo: { }
@@ -375,12 +374,26 @@ let someLocalNotification = NotificationsIOS.localNotification({
To dismiss notifications from the notification center that have already been shown to the user, call `NotificationsIOS.removeDeliveredNotifications([notificationId])`:
386
+
387
+
```javascript
388
+
let someLocalNotification =NotificationsIOS.localNotification({...});
Removes all delivered notifications from Notification Center.
475
+
476
+
---
477
+
443
478
## PushKit API (iOS only)
444
479
445
480
The PushKit framework provides the classes for your iOS apps to receive background pushes from remote servers. it has better support for background notifications compared to regular push notifications with `content-available: 1`. More info in [iOS PushKit documentation](https://developer.apple.com/library/ios/documentation/NetworkingInternet/Reference/PushKit_Framework/).
0 commit comments