braze-react-native-sdk
braze-react-native-sdk copied to clipboard
[Bug]: In-App Notification Timing Issues in React Native Expo App
Which Platforms?
Both
Which React Native Version?
0.72.10
Which @braze/react-native-sdk SDK version?
8.4.0
Repro Rate
100%
Steps To Reproduce
Example:
function App.tsx () {
import Braze from "@braze/react-native-sdk"
...
`Braze.changeUser("myUserId")`
const permissionOptions = {
alert: true,
sound: true,
badge: true,
provisional: true,
};
Braze.requestPushPermission(permissionOptions);
}
...
app.config.ts
...
plugins: [
"react-native-email-link",
"expo-apple-authentication",
[
"@braze/expo-plugin",
{
androidApiKey: "...",
iosApiKey: "...",
baseUrl: "sdk.iad-05.braze.com",
enableBrazeIosPush: true,
enableFirebaseCloudMessaging: true,
firebaseCloudMessagingSenderId: "...",
enableSdkAuthentication: true,
androidNotificationLargeIcon: "@mipmap/ic_launcher",
androidNotificationSmallIcon: "@mipmap/ic_launcher_round",
iosRequestPushPermissionsAutomatically: false,
},
],
[
"expo-build-properties",
{
android: {
compileSdkVersion: 33,
targetSdkVersion: 33,
},
ios: {
deploymentTarget: "13.4",
},
},
],
],
```
Braze dashboard settings:
1. In Braze Compose Messages section --> Request Push Permission is selected as a button response. Since this is a Push Primer In-App message.
2. In Braze the Action-Based delivery --> `Perform Custom Event` is set to `Label Generated`
3. The email I want to use is set. Reachable users is at the expected 1
### Expected Behavior
1. When the "Label Generated" event is triggered, the corresponding in-app notification should appear immediately on the user's device
### Actual Incorrect Behavior
1. The in-app notification corresponding to the "Label Generated" event does not appear in real-time. The event logs correctly in the Braze dashboard, so the Overview section for the user shows the event is registered and makes it into Braze as expected but it fails to trigger an immediate in-app notification
### Additional Information
1. The Braze SDK integration works as expected for Push Notifications.
Hi @Camus1859 ,
Thanks for reaching out! Here are some things that may help resolve your issue:
- Are you calling subscribeToInAppMessage before expecting to receive any in-app messages? This is necessary for listening and subscribing to events.
- Are you setting the correct value for
trigger minimum time interval
for Android and iOS? This value determines the minimum time interval in seconds between triggers, where default is 30 seconds.
If you are still seeing this issue after the above, can you please contact [email protected] with more details around the logs you are seeing, as well as adding any additional verbose logs? Also, please provide any additional details regarding your push and in-app message implementation. Thank you!