ProtectedDataMonitor

public class ProtectedDataMonitor: BaseNotificationMonitor

A ProtectedDataMonitor instance monitors the app for changes to the accessibility of protected files.

  • Encapsulates changes to the accessibility of protected files.

    See more

    Declaration

    Swift

    public enum Event
  • Specifies which events to monitor.

    See more

    Declaration

    Swift

    public struct Options: OptionSet
  • Initializes a new ProtectedDataMonitor.

    Declaration

    Swift

    public init(queue: OperationQueue = .main,
                options: Options = .all,
                handler: @escaping (Event) -> Void)

    Parameters

    queue

    The operation queue on which the handler executes. By default, the main operation queue is used.

    options

    The options that specify which events to monitor. By default, all events are monitored.

    handler

    The handler to call when protected files become available for your code to access, or shortly before protected files are locked down and become inaccessible.

  • A Boolean value indicating whether content is accessible for protected files.

    Declaration

    Swift

    public var isContentAccessible: Bool
  • Declaration

    Swift

    public override func addNotificationObservers()