From d75282b40064ce472b0161735b16378d25f3e39e Mon Sep 17 00:00:00 2001 From: Daniel Dimitrov Date: Wed, 26 Aug 2020 14:50:48 +0200 Subject: [PATCH] fix: undelivered background data message ios (#4144) A temporary fix until a better solution is implemented. --- ios/RNFBMessaging/RNFBMessaging+AppDelegate.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ios/RNFBMessaging/RNFBMessaging+AppDelegate.m b/ios/RNFBMessaging/RNFBMessaging+AppDelegate.m index 4b36340b80..22b2c38bd3 100644 --- a/ios/RNFBMessaging/RNFBMessaging+AppDelegate.m +++ b/ios/RNFBMessaging/RNFBMessaging+AppDelegate.m @@ -119,7 +119,7 @@ - (void)application:(UIApplication *)application didReceiveRemoteNotification:(N // TODO investigate later - RN bridge gets invalidated at start when in background and a new bridge created - losing all events // TODO so we just delay sending the event for a few seconds as a workaround // TODO most likely Remote Debugging causing bridge to be invalidated - dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t) (2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t) (8 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ [[RNFBRCTEventEmitter shared] sendEventWithName:@"messaging_message_received_background" body:[RNFBMessagingSerializer remoteMessageUserInfoToDict:userInfo]]; }); } else {