Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
neerhaj authored Jan 9, 2023
1 parent 9f21de8 commit 906ff5c
Showing 1 changed file with 15 additions and 14 deletions.
29 changes: 15 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

});
```
Expand All @@ -393,7 +381,6 @@ componentDidMount() {
console.log(response);
);
}
componentWillUnmount() {
if (this.messageCenterListener) {
this.messageCenterListener.remove();
Expand All @@ -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

Expand Down

0 comments on commit 906ff5c

Please sign in to comment.