mattermost-mobile-upstream/app
Elias Nahum 7d0e1de2a7
Guard long-running DB chains against RUNNINGBOARD 0xdead10cc on iOS (#10110) (#10133) (#10136)
* 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: Mattermost Build <build@mattermost.com>
2026-09-07 08:57:04 +03:00
..
actions Guard long-running DB chains against RUNNINGBOARD 0xdead10cc on iOS (#10110) (#10133) (#10136) 2026-09-07 08:57:04 +03:00
client Fix link to image proxy and correct padding in image sizing on blocks (#9976) (#9983) 2026-07-30 15:07:57 +03:00
components [MM-69129] Prevent crash on nameless attachment (#10091) (#10134) 2026-09-07 08:26:41 +03:00
constants replace react-native-incall-manager with @mattermost/calls-native for audio management (#9973) (#10044) 2026-08-17 11:39:56 +03:00
context Migrate from RNN to Expo router (#9402) 2026-05-13 17:44:55 +08:00
database Mm 68767 zero persistence (#9803) (#9957) 2026-07-20 13:31:53 +03:00
helpers Migrate from RNN to Expo router (#9402) 2026-05-13 17:44:55 +08:00
hooks Mm 68767 zero persistence (#9803) (#9957) 2026-07-20 13:31:53 +03:00
i18n Add autotranslations (#9324) 2026-02-10 17:50:39 +01:00
init On iOS, resuming after the 5-minute window showed no biometric prompt — (#10102) (#10132) (#10135) 2026-09-07 08:50:51 +03:00
keyboard resumes slide animation after stopping due to modal system dialog showing (#9792) 2026-05-29 06:50:57 +08:00
managers On iOS, resuming after the 5-minute window showed no biometric prompt — (#10102) (#10132) (#10135) 2026-09-07 08:50:51 +03:00
products replace react-native-incall-manager with @mattermost/calls-native for audio management (#9973) (#10044) 2026-08-17 11:39:56 +03:00
queries Mm 68767 zero persistence (#9803) (#9957) 2026-07-20 13:31:53 +03:00
routes Route through usePropsFromParams for remaining stragglers (#9949) (#9952) 2026-07-20 08:55:51 +03:00
screens fix: push notification navigation delay and stale in-app avatar (#9929) (#10087) 2026-08-21 08:23:29 +03:00
store fix: push notification navigation delay and stale in-app avatar (#9929) (#10087) 2026-08-21 08:23:29 +03:00
utils On iOS, resuming after the 5-minute window showed no biometric prompt — (#10102) (#10132) (#10135) 2026-09-07 08:50:51 +03:00