react-native-notify-kit 9.2.0 → 9.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/ios/RNNotifee/NotifeeApiModule.mm +27 -9
- package/package.json +1 -1
- package/src/version.ts +1 -1
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "9.2.
|
|
1
|
+
export declare const version = "9.2.1";
|
package/dist/version.js
CHANGED
|
@@ -88,15 +88,33 @@ RCT_EXPORT_MODULE();
|
|
|
88
88
|
}
|
|
89
89
|
|
|
90
90
|
- (void)sendNotifeeCoreEvent:(NSDictionary *_Nonnull)eventBody {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
91
|
+
dispatch_async(dispatch_get_main_queue(), ^{
|
|
92
|
+
if (!hasListeners) {
|
|
93
|
+
[pendingCoreEvents addObject:eventBody];
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
// Routing foreground vs background is based on UIApplication state.
|
|
97
|
+
// iOS delivers didReceiveNotificationResponse: while the app is in
|
|
98
|
+
// Inactive state during a background tap transition, not Background —
|
|
99
|
+
// so we check != Active rather than == Background.
|
|
100
|
+
//
|
|
101
|
+
// Known limitation: this also routes non-tap events (DELIVERED,
|
|
102
|
+
// TRIGGER_NOTIFICATION_CREATED, DISMISSED) to the background channel
|
|
103
|
+
// if they happen to be emitted while the app is in Inactive state for
|
|
104
|
+
// unrelated reasons (Control Center open, incoming call, etc.). In
|
|
105
|
+
// practice this is rare because DELIVERED originates from
|
|
106
|
+
// willPresentNotification: (only called when app is Active) and the
|
|
107
|
+
// API-triggered events require an interactive JS context. If this
|
|
108
|
+
// becomes a real-world problem, the routing should be split by event
|
|
109
|
+
// type rather than by state alone.
|
|
110
|
+
BOOL isBackground = RCTRunningInAppExtension() ||
|
|
111
|
+
[UIApplication sharedApplication].applicationState != UIApplicationStateActive;
|
|
112
|
+
if (isBackground) {
|
|
113
|
+
[self sendEventWithName:kReactNativeNotifeeNotificationBackgroundEvent body:eventBody];
|
|
114
|
+
} else {
|
|
115
|
+
[self sendEventWithName:kReactNativeNotifeeNotificationEvent body:eventBody];
|
|
116
|
+
}
|
|
117
|
+
});
|
|
100
118
|
}
|
|
101
119
|
|
|
102
120
|
// clang-format off
|
package/package.json
CHANGED
package/src/version.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Generated by genversion.
|
|
2
|
-
export const version = '9.2.
|
|
2
|
+
export const version = '9.2.1';
|