mattermost-mobile-upstream/libraries/@mattermost
Mattermost Build 6a1638d8a8
Guard long-running DB chains against RUNNINGBOARD 0xdead10cc on iOS (#10110) (#10133)
* Guard long-running DB chains against RUNNINGBOARD 0xdead10cc on iOS

iOS can terminate the app if it's suspended while a SQLite statement
still holds the shared App Group database lock. AppDelegate already
held a single background-task assertion across the background
transition, but it was a blind, fixed-duration timer: it never
tracked whether a DB operation was actually still running, and a
chain that started after the timer had already begun (or ran long
enough to outlast it) got no protection.

Add DatabaseActivityAssertion (a Swift port of Quinn "The Eskimo!"'s
QRunInBackgroundAssertion) and DatabaseLockProtectionManager, which
lets any caller - the app lifecycle transition, or a specific
long-running chain - acquire its own independent background-task
job and release it exactly when its own work finishes. Wire this
into the websocket reconnect sync (doReconnect) and the deferred
per-team entry sync (restDeferredAppEntryActions), the two longest
sequential local-DB chains in the app, via a new pair of RNUtils
methods (iOS only; Android is a no-op, since 0xdead10cc has no
Android equivalent).

* fix tests

(cherry picked from commit bc84b6ee3a)

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2026-09-07 08:26:32 +03:00
..
calls-native replace react-native-incall-manager with @mattermost/calls-native for audio management (#9973) 2026-08-06 07:38:54 +08:00
hardware-keyboard Migrate from RNN to Expo router (#9402) 2026-05-13 17:44:55 +08:00
intune@0bfd1dfae9 Migrate from RNN to Expo router (#9402) 2026-05-13 17:44:55 +08:00
rnshare [MM-68986][MM-69203] Add module to collect Session Attributes from Mobile App (#9830) (#10073) 2026-08-18 14:05:37 -04:00
rnutils Guard long-running DB chains against RUNNINGBOARD 0xdead10cc on iOS (#10110) (#10133) 2026-09-07 08:26:32 +03:00
secure-pdf-viewer Migrate from RNN to Expo router (#9402) 2026-05-13 17:44:55 +08:00