Created
April 23, 2020 20:00
-
-
Save actuosus/f24b18d89bce6da94441dbf9172b899e to your computer and use it in GitHub Desktop.
React Native Firebase Messaging Patch to use with patch-package when `mutable-content` is number or string
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/node_modules/@react-native-firebase/messaging/ios/RNFBMessaging/RNFBMessagingSerializer.m b/node_modules/@react-native-firebase/messaging/ios/RNFBMessaging/RNFBMessagingSerializer.m | |
index 18d69d9..8685051 100644 | |
--- a/node_modules/@react-native-firebase/messaging/ios/RNFBMessaging/RNFBMessagingSerializer.m | |
+++ b/node_modules/@react-native-firebase/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"]]); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yes, change it, I can sent the push notification to every one.