PSPDFApplicationPolicy

Objective-C

@protocol PSPDFApplicationPolicy

Swift

protocol ApplicationPolicy

The security auditor protocol defines a custom set of overrides for various security related tasks.

  • Returns YES when the PSPDFPolicyEvent is allowed. isUserAction is a hint that indicates if we’re in a user action or an automated test. If it’s a user action, it is appropriate to present an alert explaining the lack of permissions.

    Declaration

    Objective-C

    - (BOOL)hasPermissionForEvent:(nonnull PSPDFPolicyEvent)event
                     isUserAction:(BOOL)isUserAction;

    Swift

    func hasPermission(forEvent event: PolicyEvent, isUserAction: Bool) -> Bool