()
| 255 | * Use this before applying any realtime updates such as code-push or expo updates. |
| 256 | */ |
| 257 | export async function flush(): Promise<boolean> { |
| 258 | try { |
| 259 | const client = getClient(); |
| 260 | |
| 261 | if (client) { |
| 262 | const result = await client.flush(); |
| 263 | |
| 264 | return result; |
| 265 | } |
| 266 | } catch (_) {} |
| 267 | |
| 268 | debug.error('Failed to flush the event queue.'); |
| 269 | |
| 270 | return false; |
| 271 | } |
| 272 | |
| 273 | /** |
| 274 | * Closes the SDK, stops sending events. |
no test coverage detected