When launching an application that has previously been force closed, React Native's Linking API doesn't
support handling push notifications and deep links in the payload. This is due to a race condition on startup between
the native call to RCTLinkingManager and React's loading of its JavaScript. This function provides a workaround:
If an application is launched from a push notification click, we return the full push payload.
On iOS, this requires calling [[BrazeReactUtils sharedInstance] populateInitialPayloadFromLaunchOptions:launchOptions]
in your AppDelegate's application:didFinishLaunchingWithOptions: method.
On Android, this requires calling BrazeReactUtils.populateInitialPushPayloadFromIntent(intent) in your
MainActivity's onCreate() method.
See the sample app for example implementations on both platforms.
When launching an application that has previously been force closed, React Native's Linking API doesn't support handling push notifications and deep links in the payload. This is due to a race condition on startup between the native call to RCTLinkingManager and React's loading of its JavaScript. This function provides a workaround: If an application is launched from a push notification click, we return the full push payload.
On iOS, this requires calling
[[BrazeReactUtils sharedInstance] populateInitialPayloadFromLaunchOptions:launchOptions]in your AppDelegate'sapplication:didFinishLaunchingWithOptions:method.On Android, this requires calling
BrazeReactUtils.populateInitialPushPayloadFromIntent(intent)in your MainActivity'sonCreate()method.See the sample app for example implementations on both platforms.