Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 0 additions & 1 deletion wire-ios-sync-engine/Source/Public/WireSyncEngine.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
#import <WireSyncEngine/NSError+ZMUserSession.h>

// PRIVATE
#import <WireSyncEngine/ZMBlacklistVerificator.h>
#import <WireSyncEngine/ZMAuthenticationStatus.h>
#import <WireSyncEngine/NSError+ZMUserSessionInternal.h>
#import <WireSyncEngine/ZMOperationLoop.h>
Expand Down
41 changes: 1 addition & 40 deletions wire-ios-sync-engine/Source/SessionManager/SessionManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,6 @@
let application: ZMApplication
var deleteAccountToken: Any?
var callCenterObserverToken: Any?
var blacklistVerificator: ZMBlacklistVerificator?
let configuration: SessionManagerConfiguration
var pendingURLAction: URLAction?
let apiMigrationManager: APIMigrationManager
Expand Down Expand Up @@ -475,14 +474,12 @@
logFilesProvider: logFilesProvider
)

configureBlacklistDownload()

self.memoryWarningObserver = NotificationCenter.default.addObserver(
forName: UIApplication.didReceiveMemoryWarningNotification,
object: nil,
queue: nil
) { [weak self] _ in
WireLogger.sessionManager.debug("Received memory warning, tearing down background user sessions.")

Check warning on line 482 in wire-ios-sync-engine/Source/SessionManager/SessionManager.swift

View workflow job for this annotation

GitHub Actions / Test Results

Capture of 'self' with non-Sendable type 'SessionManager?' in a '@Sendable' closure

Capture of 'self' with non-Sendable type 'SessionManager?' in a '@sendable' closure
self?.tearDownAllBackgroundSessions()
}

Expand Down Expand Up @@ -660,38 +657,6 @@
}
}

private func configureBlacklistDownload() {
guard !DeveloperFlag.multibackend.isOn else {
return
}
if configuration.blacklistDownloadInterval > 0 {
blacklistVerificator?.tearDown()
blacklistVerificator = ZMBlacklistVerificator(
checkInterval: configuration.blacklistDownloadInterval,
version: currentBuildNumber,
environment: environment,
proxyUsername: proxyCredentials?.username,
proxyPassword: proxyCredentials?.password,
readyForRequests: isUnauthenticatedTransportSessionReady,
working: nil,
application: application,
minTLSVersion: minTLSVersion,
blacklistCallback: { [weak self] blacklisted in
guard let self, !self.isAppVersionBlacklisted else { return }

if blacklisted {
isAppVersionBlacklisted = true
delegate?.sessionManagerDidBlacklistCurrentVersion(reason: .appVersionBlacklisted)
// When the application version is blacklisted we don't want have a
// transition to any other state in the UI, so we won't inform it
// anymore by setting the delegate to nil.
delegate = nil
}
}
)
}
}

public func removeProxyCredentials() {
guard let proxy = environment.proxy else { return }
_ = ProxyCredentials.destroy(for: proxy)
Expand Down Expand Up @@ -721,9 +686,6 @@
isUnauthenticatedTransportSessionReady = ready
apiVersionResolver = createAPIVersionResolver()

if blacklistVerificator != nil {
configureBlacklistDownload()
}
// force creation of unauthenticatedSession
unauthenticatedSessionFactory.readyForRequests = ready
}
Expand Down Expand Up @@ -1390,11 +1352,10 @@
deinit {
DispatchQueue
.main
.async { [backgroundUserSessions, blacklistVerificator, unauthenticatedSession, reachability] in
.async { [backgroundUserSessions, unauthenticatedSession, reachability] in
backgroundUserSessions.values.forEach { session in
session.tearDown()
}
blacklistVerificator?.tearDown()
unauthenticatedSession?.tearDown()
reachability.tearDown()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
//

@import Foundation;
@import WireUtilities;

@protocol ZMApplication;
@protocol FlowManagerType;
Expand All @@ -29,7 +30,7 @@
@class SyncStatus;
@class PushNotificationStatus;
@class ZMSyncStrategy;

Check warning on line 33 in wire-ios-sync-engine/Source/Synchronization/ZMOperationLoop.h

View workflow job for this annotation

GitHub Actions / Test Results

pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)

pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)

Check warning on line 33 in wire-ios-sync-engine/Source/Synchronization/ZMOperationLoop.h

View workflow job for this annotation

GitHub Actions / Test Results

Pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)

Pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
extern NSString * const ZMPushChannelIsOpenKey;

@interface ZMOperationLoop : NSObject <TearDownCapable>
Expand All @@ -40,15 +41,15 @@
@property (nonatomic) BOOL isSyncV2Enabled;
// Only used for multibackend support.
@property (nonatomic, strong, nullable) NSNumber *apiVersion;

Check warning on line 44 in wire-ios-sync-engine/Source/Synchronization/ZMOperationLoop.h

View workflow job for this annotation

GitHub Actions / Test Results

pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)

pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)

Check warning on line 44 in wire-ios-sync-engine/Source/Synchronization/ZMOperationLoop.h

View workflow job for this annotation

GitHub Actions / Test Results

Pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)

Pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
- (instancetype)init NS_UNAVAILABLE;

Check warning on line 45 in wire-ios-sync-engine/Source/Synchronization/ZMOperationLoop.h

View workflow job for this annotation

GitHub Actions / Test Results

pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)

pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)

Check warning on line 45 in wire-ios-sync-engine/Source/Synchronization/ZMOperationLoop.h

View workflow job for this annotation

GitHub Actions / Test Results

pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)

pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)

Check warning on line 45 in wire-ios-sync-engine/Source/Synchronization/ZMOperationLoop.h

View workflow job for this annotation

GitHub Actions / Test Results

Pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)

Pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)

Check warning on line 45 in wire-ios-sync-engine/Source/Synchronization/ZMOperationLoop.h

View workflow job for this annotation

GitHub Actions / Test Results

Pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)

Pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
- (instancetype)initWithTransportSession:(id<TransportSessionType>)transportSession

Check warning on line 46 in wire-ios-sync-engine/Source/Synchronization/ZMOperationLoop.h

View workflow job for this annotation

GitHub Actions / Test Results

pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)

pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)

Check warning on line 46 in wire-ios-sync-engine/Source/Synchronization/ZMOperationLoop.h

View workflow job for this annotation

GitHub Actions / Test Results

Pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)

Pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
requestStrategy:(id<RequestStrategy>)requestStrategy

Check warning on line 47 in wire-ios-sync-engine/Source/Synchronization/ZMOperationLoop.h

View workflow job for this annotation

GitHub Actions / Test Results

pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)

pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)

Check warning on line 47 in wire-ios-sync-engine/Source/Synchronization/ZMOperationLoop.h

View workflow job for this annotation

GitHub Actions / Test Results

Pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)

Pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
updateEventProcessor:(id<UpdateEventProcessor>)updateEventProcessor

Check warning on line 48 in wire-ios-sync-engine/Source/Synchronization/ZMOperationLoop.h

View workflow job for this annotation

GitHub Actions / Test Results

pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)

pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)

Check warning on line 48 in wire-ios-sync-engine/Source/Synchronization/ZMOperationLoop.h

View workflow job for this annotation

GitHub Actions / Test Results

Pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)

Pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
operationStatus:(OperationStatus *)operationStatus

Check warning on line 49 in wire-ios-sync-engine/Source/Synchronization/ZMOperationLoop.h

View workflow job for this annotation

GitHub Actions / Test Results

pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)

pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)

Check warning on line 49 in wire-ios-sync-engine/Source/Synchronization/ZMOperationLoop.h

View workflow job for this annotation

GitHub Actions / Test Results

Pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)

Pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
syncStatus:(SyncStatus *)syncStatus

Check warning on line 50 in wire-ios-sync-engine/Source/Synchronization/ZMOperationLoop.h

View workflow job for this annotation

GitHub Actions / Test Results

pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)

pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)

Check warning on line 50 in wire-ios-sync-engine/Source/Synchronization/ZMOperationLoop.h

View workflow job for this annotation

GitHub Actions / Test Results

Pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)

Pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
pushNotificationStatus:(PushNotificationStatus *)pushNotificationStatus

Check warning on line 51 in wire-ios-sync-engine/Source/Synchronization/ZMOperationLoop.h

View workflow job for this annotation

GitHub Actions / Test Results

pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)

pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)

Check warning on line 51 in wire-ios-sync-engine/Source/Synchronization/ZMOperationLoop.h

View workflow job for this annotation

GitHub Actions / Test Results

Pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)

Pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
uiMOC:(NSManagedObjectContext *)uiMOC

Check warning on line 52 in wire-ios-sync-engine/Source/Synchronization/ZMOperationLoop.h

View workflow job for this annotation

GitHub Actions / Test Results

pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)

pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)

Check warning on line 52 in wire-ios-sync-engine/Source/Synchronization/ZMOperationLoop.h

View workflow job for this annotation

GitHub Actions / Test Results

Pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)

Pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
syncMOC:(NSManagedObjectContext *)syncMOC
isDeveloperModeEnabled:(BOOL)isDeveloperModeEnabled
isSyncV2Enabled:(BOOL)isSyncV2Enabled
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
@class ZMTransportResponse;
@protocol UserInfoParser;
@protocol NotificationContext;
@protocol ZMSGroupQueue;

FOUNDATION_EXPORT NSTimeInterval DebugLoginFailureTimerOverride;

Expand Down
34 changes: 0 additions & 34 deletions wire-ios-sync-engine/Source/UserSession/Blacklist.swift

This file was deleted.

This file was deleted.

38 changes: 0 additions & 38 deletions wire-ios-sync-engine/Source/UserSession/ZMBlacklistDownloader.h

This file was deleted.

Loading
Loading