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(options: Options = .all,
                queue: OperationQueue = .main,
                handler: @escaping (Event) -> Void)

    Parameters

    options

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

    queue

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

    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 { get }
  • Declaration

    Swift

    override public func addNotificationObservers()