This differential implements all RCT_EXPORTED methods needed to replace react-native-notifications. Methods are implemented as in Ashoats fork.
Details
This will be a matter of subsequent diffs, but for the sake of testing one can replace NotificationsIOS.<...> methods with CommIOSNotifications methods of the same name.
Diff Detail
- Repository
- rCOMM Comm
- Lint
No Lint Coverage - Unit
No Test Coverage
Event Timeline
All methods in this differential are copied form Ashoat's fork https://github.com/Ashoat/react-native-notifications/blob/master/RNNotifications/RNNotifications.m. Subtle visual differences are results of applying formatter.
Remove conditionals throughout please, and please think more carefully about every line you write. You should know why you are writing if ([UNUserNotificationCenter class]) {, but in this case it seems like you did not know, and instead were simply copy-pasting
native/ios/Comm/CommIOSNotifications/CommIOSNotifications.mm | ||
---|---|---|
421 ↗ | (On Diff #20702) | Remove this conditional please, it's irrelevant as we target a minimum of iOS 13 now and this class was introduced in iOS 10 |
Yes, you are right - I forgot to hit "Plan Changes" on this differential. I haven't refactored it yet to remove copy-pasted code.
- Consequently use dot syntax.
- Remove redundant check for [UNNotificationCenter class]
- Change implementation of getAllDeliveredNotifications:()callback - we are using different formatting method, but it is still correct.