From f889646d2ecbede9f06fde67a63e877f14df8ced Mon Sep 17 00:00:00 2001 From: Mathieu Acthernoene Date: Thu, 28 May 2020 23:33:56 +0200 Subject: [PATCH] fix(messaging,ios): crash receiving notification with image (#3701) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently receiving notifications with images will crash the app on iOS (Fixes #3447, #3616). Patch proposed by @actuosus, thanks to him 🙌 #3447 (comment) [publish] --- packages/messaging/ios/RNFBMessaging/RNFBMessagingSerializer.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/messaging/ios/RNFBMessaging/RNFBMessagingSerializer.m b/packages/messaging/ios/RNFBMessaging/RNFBMessagingSerializer.m index be942a2329..d4ceb3c955 100644 --- a/packages/messaging/ios/RNFBMessaging/RNFBMessagingSerializer.m +++ b/packages/messaging/ios/RNFBMessaging/RNFBMessagingSerializer.m @@ -113,7 +113,7 @@ + (NSDictionary *)remoteMessageUserInfoToDict:(NSDictionary *)userInfo { } // message.mutableContent - if (apsDict[@"mutable-content"] != nil && [apsDict[@"mutable-content"] isEqualToString:@"1"]) { + if (apsDict[@"mutable-content"] != nil && [apsDict[@"mutable-content"] intValue] == 1) { message[@"mutableContent"] = @([RCTConvert BOOL:apsDict[@"mutable-content"]]); }