react-native-sdk icon indicating copy to clipboard operation
react-native-sdk copied to clipboard

Inconsistent getLastPushPayload behavior across iOS & Android

Open willcaul opened this issue 3 years ago • 0 comments

The getLastPushPayload() function's behavior is not consistent across platforms.

On Android, getLastPushPayload() only returns data corresponding to the current app session because it stores data in memory which gets forgotten when the app is killed.

On iOS, getLastPushPayload() returns data corresponding to the current app session or a previous app session because it persists data for an hour.

In my opinion, the Android behavior is preferable. Is there a reason why the iOS behavior exists? Ideally we'd like a way to determine which payload was responsible for launching the app without running into the situation where the returned data was for a previous app launch. At the very least it would be nice to have a flag on the returned result to indicate if it was an old result or not so we can distinguish between the 2 iOS scenarios.

willcaul avatar Apr 28 '22 15:04 willcaul