This differential implements method in CommIOSNotifications that allows JavaScript to use native string constants that describe background fetch result, without direct hardcoding
Details
Details
Log CommIOSNotifications.getConstants() somwhere in JS and examine its content
Diff Detail
Diff Detail
- Repository
- rCOMM Comm
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
native/ios/Comm/CommIOSNotifications/CommIOSNotifications.mm | ||
---|---|---|
53 ↗ | (On Diff #20506) | This is copied (partially) from Ashoats fork: https://github.com/Ashoat/react-native-notifications/blob/master/RNNotifications/RNNotifications.m#L108. It allows to convert particular strings passed from JavaScript to Objective C enum instances. In order not to directly hardcode those strings in JavaScript we export them as constants in constantsToExport method a couple of lines below. |
152 ↗ | (On Diff #20506) | Explanation why it is necessary: https://reactnative.dev/docs/native-modules-ios#exporting-constants |
native/ios/Comm/CommIOSNotifications/CommIOSNotifications.mm | ||
---|---|---|
55 ↗ | (On Diff #20506) | It was formatted this way by clang-format-all. |