Contents

withExclusiveControl(_:)

Declaration

func withExclusiveControl(_ performHandler: @escaping (Bool, (any Error)?) -> Void)

Parameters

  • performHandler:

    A block that will be executed once exclusive control is acquired. If an error is non-nil then a problem occurred acquiring exclusive access.

Discussion

Acquires exclusive access to the BADownloadManager across the app and application extension.

Acquires exclusive access to the BADownloadManager across the app and application extension. This ensures that your extension and app do not perform operations at the same time. Both the extension and app must use this API to ensure exclusive access.