From 906ff5c98312b5997e1d110603d4982fe58ae547 Mon Sep 17 00:00:00 2001 From: Neerhaj N Joshi Date: Mon, 9 Jan 2023 11:36:35 +0530 Subject: [PATCH] Update README.md --- README.md | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index c96bedf..1eb3c0e 100644 --- a/README.md +++ b/README.md @@ -354,21 +354,9 @@ These below steps are required for iOS In-App Messages. ### Message Center - Get the Message Center messages list using, -``` -Each Message Center message now supports an additional property called custom key-value pairs, it is a variable sized object with key value pairs and can be accessed like any other property of that message. - -``` ```javascript PushIOManager.fetchMessagesForMessageCenter(messageCenterName, (error, response) => { - if(error == null) { - for(message of response.messages){ - console.log(message.messageID) - console.log(message.message) - console.log(message.customKeyValuePairs) - - } - } }); ``` @@ -393,7 +381,6 @@ componentDidMount() { console.log(response); ); } - componentWillUnmount() { if (this.messageCenterListener) { this.messageCenterListener.remove(); @@ -407,12 +394,26 @@ useEffect(() => { const messageCenterListener = PushIOManager.addMessageCenterUpdateListener((response) => console.log(response); ); - return () => { messageCenterListener.remove() }; }; ``` + +Starting with v6.53.0, each Message Center message supports an additional property called custom key-value pairs, it is a variable sized object with key value pairs and can be accessed like any other property of that message. + + ```javascript + PushIOManager.fetchMessagesForMessageCenter(messageCenterName, (error, response) => { + if(error == null) { + for(message of response.messages){ + console.log(message.messageID) + console.log(message.message) + console.log(message.customKeyValuePairs) + + } + } + }); + ``` ### Geofences And Beacons