ClipboardProtectionEnforcer
public class ClipboardProtectionEnforcer
API to enforce a ClipboardAccessPolicy
try ClipboardProtectionEnforcer.shared.enforce(policy: .blocked)
// ... during this time copied values cannot be pasted to other apps
try ClipboardProtectionEnforcer.shared.enforce(policy: .unrestricted)
-
Returns a shared ClipboardProtectionEnforcer instance.
Declaration
Swift
public static var shared: ClipboardProtectionEnforcer { get }
-
enforces the given policy
Declaration
Swift
public func enforce(policy: ClipboardAccessPolicy = .blocked) throwsParameters
policyto be enforced
-
Identifies the clipboard access policy being enforced
Declaration
Swift
public func getEnforcedPolicy() -> ClipboardAccessPolicyReturn Value
the ClipboardAccessPolicy