5b4b027477
Summary: _(This is a remake of #6907, which I botched pretty good with a rebase.)_ This returns an `Array` of Local Notifications that have been scheduled to be delivered. Available attributes on return Notification object (if set in the local notification itself): `alertAction` `alertBody` `applicationIconBadgeNumber` `category` `fireDate` `soundName` `userInfo` More could be added to this but I just matched what was available in the `Object` passed to `presentLocalNotification` and `scheduleLocalNotification`. **Motivation** I needed to determine the number and other details about local notifications that were already scheduled. There is an API for this in iOS but one hadn't been built yet for React Native. I created the Obj-C method and updated the documentation in `PushNotificationIOS.js` as well. **Usage:** ```js PushNotificationIOS.getScheduledLocalNotifications( (notifications) => { console.log(notifications); }); ``` **Sample Output:** ```js [ Object { aler Closes https://github.com/facebook/react-native/pull/7937 Differential Revision: D3392476 Pulled By: javache fbshipit-source-id: d83f419bfcfbdaf9b955724dcf5cfe26834895fb |
||
---|---|---|
.. | ||
RCTPushNotification.xcodeproj | ||
PushNotificationIOS.js | ||
RCTPushNotificationManager.h | ||
RCTPushNotificationManager.m |