diff --git a/LocalPackages/DataBrokerProtection/Sources/DataBrokerProtection/Scheduler/DataBrokerProtectionQueueManager.swift b/LocalPackages/DataBrokerProtection/Sources/DataBrokerProtection/Scheduler/DataBrokerProtectionQueueManager.swift index dd312afbb1..c8e2bb429b 100644 --- a/LocalPackages/DataBrokerProtection/Sources/DataBrokerProtection/Scheduler/DataBrokerProtectionQueueManager.swift +++ b/LocalPackages/DataBrokerProtection/Sources/DataBrokerProtection/Scheduler/DataBrokerProtectionQueueManager.swift @@ -24,10 +24,20 @@ protocol DataBrokerProtectionOperationQueue { var maxConcurrentOperationCount: Int { get set } func cancelAllOperations() func addOperation(_ op: Operation) - func addBarrierBlock(_ barrier: @escaping @Sendable () -> Void) + func addBarrierCompletionBlock(_ barrier: @escaping @Sendable () -> Void) } -extension OperationQueue: DataBrokerProtectionOperationQueue {} +extension OperationQueue: DataBrokerProtectionOperationQueue { + /* + An unfortunute necessarity due to an issue with xcode 16 and building for Product Review Release + Originally we just used addBarrierBlock directly, but now it won't build as it says + the extension doesn't conform to the protocol + The docs however say the method signiture is unchanged, so we've decided to blame the build system + */ + func addBarrierCompletionBlock(_ barrier: @escaping @Sendable () -> Void) { + addBarrierBlock(barrier) + } +} enum DataBrokerProtectionQueueMode { case idle @@ -232,7 +242,7 @@ private extension DefaultDataBrokerProtectionQueueManager { return } - operationQueue.addBarrierBlock { [weak self] in + operationQueue.addBarrierCompletionBlock { [weak self] in let errorCollection = DataBrokerProtectionAgentErrorCollection(oneTimeError: nil, operationErrors: self?.operationErrorsForCurrentOperations()) completion?(errorCollection) self?.resetModeAndClearErrors() diff --git a/LocalPackages/DataBrokerProtection/Tests/DataBrokerProtectionTests/Mocks.swift b/LocalPackages/DataBrokerProtection/Tests/DataBrokerProtectionTests/Mocks.swift index 7eda40ac91..7bf578e3f8 100644 --- a/LocalPackages/DataBrokerProtection/Tests/DataBrokerProtectionTests/Mocks.swift +++ b/LocalPackages/DataBrokerProtection/Tests/DataBrokerProtectionTests/Mocks.swift @@ -1373,7 +1373,7 @@ final class MockDataBrokerProtectionOperationQueue: DataBrokerProtectionOperatio self.operations.append(op) } - func addBarrierBlock(_ barrier: @escaping @Sendable () -> Void) { + func addBarrierCompletionBlock(_ barrier: @escaping @Sendable () -> Void) { didCallAddBarrierBlockCount += 1 self.barrierBlock = barrier }