Forum Discussion
IOS background events not firing but Android does
iOS is very aggressive about suspending threads when the app goes into the background, so Braze cannot flush data until the app is reopened.
requestImmediateDataFlush() works, but only if the process is still running. If the app is already suspended, it will not execute.
Braze documents this behavior here: https://www.braze.com/docs/user_guide/administrative/app_settings/event_user_log_tab
What you can try:
1. Force a flush when entering background
Use the applicationDidEnterBackground event.
Start a short background task, call requestImmediateDataFlush(), then end the task.
This gives the SDK a short time window to send data before suspension.
2. Use the Background Tasks API
Apple provides a way to schedule background refreshes that periodically wake the app. See:
https://developer.apple.com/videos/play/wwdc2025/227
3. Silent pushes
Send silent push notifications to wake the app and then call requestImmediateDataFlush().
4. Braze SDK Debugger
Braze recently added a debugger that can export session logs as CSV. I’d check it as well to see if you can get more details about what happens to background events.
5. Server-side fallback
Since you mentioned your backend is already receiving events reliably, you can use Braze’s REST API (/users/track) to send those events directly from your server. I’d keep this only as a fallback for critical events when the app is backgrounded, because sending via the SDK has advantages (for example, enabling in-app message triggers)
Related Content
- 10 days ago