mattermost-mobile-upstream/ios
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
..
ErrorReporting fix(MM-63460): HTTPClientError spam (#8693) 2025-03-20 11:15:05 -06:00
Fonts Barebones code for v2 2020-11-17 14:20:58 -03:00
Gekidou replace react-native-incall-manager with @mattermost/calls-native for audio management (#9973) (#10044) 2026-08-17 11:39:56 +03:00
Mattermost Guard long-running DB chains against RUNNINGBOARD 0xdead10cc on iOS (#10110) (#10133) (#10136) 2026-09-07 08:57:04 +03:00
Mattermost.xcodeproj Bump app build number to 806 (#10088) 2026-08-21 08:36:20 +03:00
Mattermost.xcworkspace feat(iOS): Add Microsoft Intune MAM integration with multi-server support (#9312) 2025-12-10 13:07:28 +02:00
MattermostShare Bump app build number to 806 (#10088) 2026-08-21 08:36:20 +03:00
MattermostTests Barebones code for v2 2020-11-17 14:20:58 -03:00
NotificationService Bump app build number to 806 (#10088) 2026-08-21 08:36:20 +03:00
SplashScreenResource Migrate from RNN to Expo router (#9402) 2026-05-13 17:44:55 +08:00
.xcode.env Gekidou upgrade RN to 0.69.3 and dependencies (#6537) 2022-08-08 09:06:20 -04:00
bundleReactNative.sh Multiple Fixes (#9767) 2026-05-19 16:35:20 +08:00
GekidouWrapper.swift Migrate from RNN to Expo router (#9402) 2026-05-13 17:44:55 +08:00
Podfile Revert "e2e(detox): Rainforest to Detox migration (#9790)" (#9834) 2026-06-15 17:57:01 +02:00
Podfile.lock Guard long-running DB chains against RUNNINGBOARD 0xdead10cc on iOS (#10110) (#10133) (#10136) 2026-09-07 08:57:04 +03:00
Podfile.properties.json Migrate from RNN to Expo router (#9402) 2026-05-13 17:44:55 +08:00
PrivacyInfo.xcprivacy feat(iOS): Add Microsoft Intune MAM integration with multi-server support (#9312) 2025-12-10 13:07:28 +02:00
uploadDebugSymbols.sh Added support for self-hosted Sentry (#7230) 2023-04-19 14:58:59 -04:00