Instance Property


Returns whether the specified PDF document is currently unlocked.


var isUnlocked: Bool { get }



A PDF document.

Return Value

A Boolean that, if true, indicates that the document is not locked. If the value is false, the document is locked.


There are two possible reasons why a PDF document is unlocked:

  • The document is not encrypted.

  • The document is encrypted, and a valid password was previously specified using unlockWithPassword(_:).

See Also

Working with an Encrypted PDF Document

var isEncrypted: Bool

Returns whether the specified PDF file is encrypted.

var allowsCopying: Bool

Returns whether the specified PDF document allows copying.

var allowsPrinting: Bool

Returns whether a PDF document allows printing.

func unlockWithPassword(UnsafePointer<Int8>) -> Bool

Unlocks an encrypted PDF document when a valid password is supplied.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software