[Question] Sync in background
Closed this issue · 1 comments
I need to sync features when the app goes to the background.
iOS provides methods to handle background tasks, such as backgroundSync: true
.
I'm not sure what it's the best way to implement that. Currently, I'm using sdk.refreshCache()
when the app goes to the background, but I'm unsure if this is optimal or SDK/builder provide another method. What is the recommended function or approach for this scenario?
Hello!
If short - using sdk.refreshCache()
is the best way for this SDK.
As far as I know backgroundSync: true
in Swift SDK just create SSE connection. We see that SSE connection is hold only for 5min from Backend, so it seems like it doesn't fit your case.
Seems like we should recommend WorkManager or AlarmManager to wake up the app and call sdk.refreshCache()