Skip to content
This repository has been archived by the owner on Sep 24, 2021. It is now read-only.

Commit

Permalink
fix(ios): treat events when app is inactive as background events
Browse files Browse the repository at this point in the history
  • Loading branch information
helenaford committed Jun 30, 2021
1 parent e35fd23 commit a1b9b89
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions ios/RNNotifee/NotifeeApiModule.m
Original file line number Diff line number Diff line change
Expand Up @@ -80,14 +80,11 @@ - (void)didReceiveNotifeeCoreEvent:(NSDictionary *_Nonnull)event foreground: (BO
}

- (void)sendNotifeeCoreEvent:(NSDictionary *_Nonnull)eventBody foreground: (BOOL)foreground; {
dispatch_after(
dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
if (RCTRunningInAppExtension() || !foreground ) {
[self sendEventWithName:kReactNativeNotifeeNotificationBackgroundEvent body:eventBody];
} else {
[self sendEventWithName:kReactNativeNotifeeNotificationEvent body:eventBody];
}
});
}
// TODO(helenaford): look into a custom format style for React Native Method signatures
// clang-format off
Expand Down

0 comments on commit a1b9b89

Please sign in to comment.