Add experimental native calls behind a developer flag (#6159)

Add the element-call-ios dependency and a developer option for native calls

The package carries the call UI and the matrix-rust-rtc media stack, pinned by
exact version the way the SDK is, with the local path kept commented out for
working against a checkout. Its media xcframework has no Intel simulator slice
and a package cannot say so for the projects that consume it, hence the
excluded architecture at the project level.

The developer option is off by default and nothing reads it yet. It is placed
next to the Element Call URL override, which only applies to the web view that
native calls replace.
This commit is contained in:
Valere Fedronic
2026-09-17 18:42:18 +02:00
committed by GitHub
parent fe18472556
commit fb49f5b83b
33 changed files with 1778 additions and 160 deletions
@@ -113,7 +113,7 @@ class AppCoordinator: AppCoordinatorProtocol, AuthenticationFlowCoordinatorDeleg
userIndicatorController = UserIndicatorController()
elementCallService = ElementCallService()
elementCallService = ElementCallService(appSettings: appSettings)
navigationRootCoordinator = NavigationRootCoordinator()
@@ -826,6 +826,9 @@ class AppCoordinator: AppCoordinatorProtocol, AuthenticationFlowCoordinatorDeleg
Task { await pauseClientServices(isBackgroundTask: false) }
userSessionFlowCoordinator?.stop()
// Leaves any ongoing call and releases the native call stack, which a soft logout would
// otherwise leave running against a session that can no longer reach the server.
elementCallService.setUserSession(nil)
guard !isSoft else {
stateMachine.processEvent(.showSoftLogout)
@@ -895,7 +898,7 @@ class AppCoordinator: AppCoordinatorProtocol, AuthenticationFlowCoordinatorDeleg
fatalError("User session not setup")
}
elementCallService.setClientProxy(userSession.clientProxy)
elementCallService.setUserSession(userSession)
}
private func configureNotificationManager() {
@@ -472,6 +472,10 @@ final nonisolated class AppSettings: @unchecked Sendable {
@UserPreference(defaultValue: AppBuildType.current != .release)
var developerOptionsEnabled: Bool
/// Runs calls through the native matrix-rust-rtc stack instead of the Element Call web view.
@UserPreference(defaultValue: false)
var nativeCallEnabled: Bool
init(store: UserDefaultsProtocol) {
self.store = store
}