Skip to content
Merged
Show file tree
Hide file tree
Changes from 24 commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
54b4323
remove code in nse
netbe Dec 3, 2025
acf7266
remove blacklist
netbe Dec 3, 2025
4099df6
remove old blacklist
netbe Dec 3, 2025
9ef3299
code review
netbe Dec 10, 2025
e3a6d12
remove dead authentication code
netbe Dec 3, 2025
be5baf9
remove authentication mutlibackend parameter
netbe Dec 3, 2025
3e63d6f
remove accountSelectorView
netbe Dec 3, 2025
267f39b
remove auth tests
netbe Dec 3, 2025
2fdd106
self profile view tests
netbe Dec 3, 2025
5e84259
update appstate calculator
netbe Dec 3, 2025
9259914
share extension update
netbe Dec 3, 2025
6b02b53
ZMClientRegistrationStatus update
netbe Dec 3, 2025
c06357f
remove DeveloperFlag.multibackend deadcode
netbe Dec 3, 2025
f9e1589
format and remove last if
netbe Dec 3, 2025
8e1a611
remove SharingSession init
netbe Dec 16, 2025
2fff789
Merge branch 'develop' into chore/remove-multibackend
netbe Dec 17, 2025
d9dbc26
Merge branch 'develop' into chore/remove-multibackend
netbe Dec 17, 2025
8fad623
Merge branch 'develop' into chore/remove-multibackend
netbe Dec 18, 2025
5c692f0
fix: slow request strategies tests - WPB-22487 (#4028)
netbe Dec 18, 2025
6bb909f
add tests following crash on CI
netbe Dec 19, 2025
087967c
fix test
netbe Dec 19, 2025
134bd83
fix syncContext mark
netbe Dec 19, 2025
66b6b8d
format
netbe Dec 19, 2025
60e1872
Merge branch 'fix/slow-request-strategies-tests-cherry-pick' into cho…
netbe Dec 19, 2025
2812b12
Apply suggestions from code review
netbe Dec 19, 2025
e3ad835
Update wire-ios-sync-engine/Source/Synchronization/ZMOperationLoop+AP…
netbe Dec 19, 2025
69a0852
Merge branch 'chore/remove-multibackend' of github.com:wireapp/wire-i…
netbe Dec 19, 2025
72957d2
try limit
netbe Dec 19, 2025
1d793f1
fix setup tests
netbe Dec 19, 2025
9109a96
Revert "try limit"
netbe Dec 19, 2025
0175907
Merge branch 'fix/slow-request-strategies-tests-cherry-pick' into cho…
netbe Dec 19, 2025
c008218
Merge branch 'chore/remove-multibackend' of github.com:wireapp/wire-i…
netbe Dec 19, 2025
40117d8
fix sync engine
netbe Dec 19, 2025
2e0ea46
format
netbe Dec 19, 2025
9e7d25f
check todos
netbe Dec 19, 2025
aecb0d3
Merge branch 'develop' into chore/remove-multibackend
netbe Dec 19, 2025
75ee5e7
Merge branch 'develop' into chore/remove-multibackend
netbe Jan 5, 2026
45eddc6
fix failing tests
netbe Jan 5, 2026
20be74e
wire-ios/Wire-iOS Tests/ReferenceImages/SelfProfileViewControllerTest…
netbe Jan 5, 2026
864ae2c
wire-ios/Wire-iOS Tests/ReferenceImages/SelfProfileViewControllerTest…
netbe Jan 5, 2026
bfb1534
Merge branch 'develop' into chore/remove-multibackend
netbe Jan 5, 2026
a11f1d4
format
netbe Jan 6, 2026
6bec2dd
merge origin develop
netbe Jan 6, 2026
4ccf3e9
Merge branch 'develop' into chore/remove-multibackend
netbe Jan 6, 2026
3f5a25c
Update WireAuthentication/Sources/WireAuthenticationUI/Views/Determin…
netbe Jan 7, 2026
a326724
Merge branch 'develop' into chore/remove-multibackend
netbe Jan 7, 2026
50c8a66
Merge branch 'develop' into chore/remove-multibackend
netbe Jan 12, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ protocol DetermineAuthMethodComponentDependency: Dependency {
var preferredAPIVersion: APIVersion? { get }
var minTLSVersion: TLSVersion { get }
var ssoCallbackURLScheme: String { get }
var isMultibackendEnabled: Bool { get }

}

final class DetermineAuthMethodComponent: Component<DetermineAuthMethodComponentDependency> {
Expand Down Expand Up @@ -97,8 +95,7 @@ extension DetermineAuthMethodComponent: DetermineAuthMethodViewModel.Factory {
router: dependency.router,
bridge: dependency.bridge,
environment: networkStack.backendEnvironment,
existsAnotherAccount: existsAnotherAccount,
isMultibackendEnabled: dependency.isMultibackendEnabled
existsAnotherAccount: existsAnotherAccount
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ final class RootComponent: BootstrapComponent {
public let ssoCallbackURLScheme: String
public let appStoreURL: URL
public let accountsPublisher: CurrentValuePublisher<[AccountUIModel]>
public let isMultibackendEnabled: Bool
public let registrationAnalyticsTracker: (any RegistrationAnalyticsTrackerProtocol)?

@MainActor public var bridge: WireAuthenticationBridge {
Expand Down Expand Up @@ -69,7 +68,6 @@ final class RootComponent: BootstrapComponent {
ssoCallbackURLScheme: String,
appStoreURL: URL,
accountsPublisher: CurrentValuePublisher<[AccountUIModel]>,
isMultibackendEnabled: Bool,
registrationAnalyticsTracker: (any RegistrationAnalyticsTrackerProtocol)?
) {
self.authenticationType = authenticationType
Expand All @@ -85,7 +83,6 @@ final class RootComponent: BootstrapComponent {
self.ssoCallbackURLScheme = ssoCallbackURLScheme
self.appStoreURL = appStoreURL
self.accountsPublisher = accountsPublisher
self.isMultibackendEnabled = isMultibackendEnabled
self.registrationAnalyticsTracker = registrationAnalyticsTracker
}

Expand Down Expand Up @@ -119,7 +116,6 @@ extension RootComponent: RootViewModel.Factory {
bridge: bridge,
environment: environment,
authenticationType: authenticationType,
isMultibackendEnabled: isMultibackendEnabled,
hasOtherAccountsProvider: { [accountsPublisher] in
!accountsPublisher.value.isEmpty
}
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ public struct WireAuthenticationAssembly {
ssoCallbackURLScheme: String,
appStoreURL: URL,
accountsPublisher: CurrentValuePublisher<[AccountUIModel]>,
isMultibackendEnabled: Bool,
registrationAnalyticsTracker: (any RegistrationAnalyticsTrackerProtocol)?
) -> (view: some View, bridge: WireAuthenticationBridge) {
let rootComponent = RootComponent(
Expand All @@ -66,7 +65,6 @@ public struct WireAuthenticationAssembly {
ssoCallbackURLScheme: ssoCallbackURLScheme,
appStoreURL: appStoreURL,
accountsPublisher: accountsPublisher,
isMultibackendEnabled: isMultibackendEnabled,
registrationAnalyticsTracker: registrationAnalyticsTracker
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ struct FakeDetermineAuthMethodFactory: DetermineAuthMethodFactory,
router: FakeRootFactory().viewModel,
bridge: WireAuthenticationBridge(),
environment: mockDependencies.backendEnvironment,
existsAnotherAccount: existsAnotherAccount,
isMultibackendEnabled: false
existsAnotherAccount: existsAnotherAccount
)
viewModel.emailOrSSOCode = emailOrSSOCode
return viewModel
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ struct FakeRootFactory: RootFactory, OpenAppStoreUseCaseFactory {
bridge: WireAuthenticationBridge(),
environment: mockDependencies.backendEnvironment,
authenticationType: .new,
isMultibackendEnabled: false,
hasOtherAccountsProvider: { true },
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ package final class DetermineAuthMethodViewModel: ObservableObject {
private let bridge: WireAuthenticationBridge
package let environment: BackendEnvironment2
private var cancellable: AnyCancellable?
private let isMultibackendEnabled: Bool

// MARK: - Life cycle

Expand All @@ -68,7 +67,6 @@ package final class DetermineAuthMethodViewModel: ObservableObject {
emailOrSSOCode: String = "",
existsAnotherAccount: Bool,
isLoading: Bool = false,
isMultibackendEnabled: Bool
) {
self.factory = factory
self.router = router
Expand All @@ -77,7 +75,6 @@ package final class DetermineAuthMethodViewModel: ObservableObject {
self.emailOrSSOCode = emailOrSSOCode
self.existsAnotherAccount = existsAnotherAccount
self.isLoading = isLoading
self.isMultibackendEnabled = isMultibackendEnabled

self.cancellable = bridge.inboundEvents.sink { [weak self] event in
switch event {
Expand Down Expand Up @@ -206,7 +203,7 @@ package final class DetermineAuthMethodViewModel: ObservableObject {
email: String?,
backendConfigURL: URL
) async {
guard isMultibackendEnabled || !existsAnotherAccount else {
guard !existsAnotherAccount else { // double check this
alert = .switchBackendFailed
return
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ package struct RootView: View {
switch alert {
case .obsoleteClient:
Text(
viewModel.isMultibackendEnabled ? L10n.Localizable.ObsoleteClientMultibackend.Alert
.title : L10n.Localizable.ObsoleteClient.Alert.title
L10n.Localizable.ObsoleteClientMultibackend.Alert
.title
)
default:
Text(alert.title)
Expand All @@ -75,15 +75,10 @@ package struct RootView: View {
message: { alert in
switch alert {
case .obsoleteBackend:
Text(
viewModel.isMultibackendEnabled ? L10n.Localizable.ObsoleteBackendMultibackend.Alert
.message : L10n.Localizable.ObsoleteBackend.Alert.message
)
Text(L10n.Localizable.ObsoleteBackendMultibackend.Alert.message)
case .obsoleteClient:
Text(
viewModel.isMultibackendEnabled ? L10n.Localizable.ObsoleteClientMultibackend
.Alert.message : L10n.Localizable.ObsoleteClient.Alert.message
)
Text(L10n.Localizable.ObsoleteClientMultibackend
.Alert.message)
default:
Text(alert.message)
}
Expand All @@ -92,7 +87,7 @@ package struct RootView: View {
switch alert {
case .obsoleteClient:
obsoleteClientAlertActions()
case .obsoleteBackend where viewModel.isMultibackendEnabled:
case .obsoleteBackend:
obsoleteBackendAlertActions()
case .logoutConfirmation:
logoutConfirmationButtons
Expand Down Expand Up @@ -165,17 +160,15 @@ package struct RootView: View {
@ViewBuilder
private func obsoleteClientAlertActions() -> some View {
Button(
viewModel.isMultibackendEnabled ? Strings.Obsolete.Alert.updateButton : Strings.ObsoleteClient.Alert
.okButton,
Strings.Obsolete.Alert.updateButton,
action: viewModel.goToAppStore
)
switchAccountsAlertButtonIfNeeded()
if viewModel.isMultibackendEnabled {
Button(
Strings.Obsolete.Alert.cancel,
action: viewModel.dismissAlert
)
}

Button(
Strings.Obsolete.Alert.cancel,
action: viewModel.dismissAlert
)
}

@ViewBuilder private var logoutConfirmationButtons: some View {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,10 @@ package final class RootViewModel: ObservableObject, Router {
@Published var modalDestination: RootViewSheet?
@Published var alert: Alert?

let isMultibackendEnabled: Bool
let hasOtherAccountsProvider: () -> Bool

var shouldShowSwitchAccountsAlertButton: Bool {
isMultibackendEnabled && hasOtherAccountsProvider()
hasOtherAccountsProvider()
}

// MARK: - Dependencies
Expand All @@ -56,11 +55,9 @@ package final class RootViewModel: ObservableObject, Router {
bridge: WireAuthenticationBridge,
environment: BackendEnvironment2,
authenticationType: AuthenticationType,
isMultibackendEnabled: Bool,
hasOtherAccountsProvider: @escaping () -> Bool
) {
self.factory = factory
self.isMultibackendEnabled = isMultibackendEnabled
self.hasOtherAccountsProvider = hasOtherAccountsProvider
self.bridge = bridge

Expand Down
2 changes: 1 addition & 1 deletion WirePreviewApps/WireAuthenticationApp/ContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ struct ContentView: View {
var body: some View {
WireAuthenticationAssembly()
.assemble(
authenticationType: .new,
environmentType: configuration.defaultBackendEnvironment,
environment: BackendEnvironment2(
title: "Mock backend",
Expand Down Expand Up @@ -79,7 +80,6 @@ struct ContentView: View {
]
)
),
isMultibackendEnabled: true,
registrationAnalyticsTracker: MockPersonalAccountCreationAnalyticsTracker()
).view
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,11 @@ public final class CoreDataStack: NSObject, CoreDataStackProtocol, ContextProvid
#endif
}

public lazy var syncContext: NSManagedObjectContext = messagesContainer.newBackgroundContext()
public lazy var syncContext: NSManagedObjectContext = {
let context = messagesContainer.newBackgroundContext()
context.markAsSyncContext()
return context
}()

public lazy var searchContext: NSManagedObjectContext = messagesContainer.newBackgroundContext()

Expand Down Expand Up @@ -391,7 +395,7 @@ public final class CoreDataStack: NSObject, CoreDataStackProtocol, ContextProvid
}

func configureSyncContext(_ context: NSManagedObjectContext) async {
context.markAsSyncContext()
// Note: markAsSyncContext() is now called in the lazy initializer
await context.perform {
context.localDomain = self.localDomain
context.isFederationEnabled = self.isFederationEnabled
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ public extension ZMConversation {
created: UnsafeMutablePointer<Bool>
) -> ZMConversation {
// We must only ever call this on the sync context. Otherwise, there's a race condition
// where the UI and sync contexts could both insert the same user (same UUID) and we'd end up
// having two duplicates of that user, and we'd have a really hard time recovering from that.
require(context.zm_isSyncContext, "Users are only allowed to be created on sync context")
// where the UI and sync contexts could both insert the same conversation (same UUID) and we'd end up
// having two duplicates of that conversation, and we'd have a really hard time recovering from that.
require(context.zm_isSyncContext, "Conversations are only allowed to be created on sync context")
let domain: String? = context.isFederationEnabled ? domain : nil

if let conversation = fetch(with: remoteIdentifier, domain: domain, in: context) {
Expand Down
Loading
Loading