Saving Triggers for Annotations and Bookmarks
PSPDFKit will save “dirty” (changed/created/deleted) annotations on several occasions.
viewControlleris popped (in
viewWillDisappear(_:), unless PSPDFKit is presenting a controller on top of
When the document on the
When the app is moved into the background (
UIActivityViewControllerasks for a document data/URL to share.
When a document will be digitally signed.
Saving can also be controlled on a per-document level by setting
To customize the autosaving behavior, you can override the
handleAutosaveRequest(for document: Document, reason: PSPDFAutosaveReason) method on
PSPDFViewController. Use this only when you really understand what you are doing, as there might be unintended side effects, such as sharing not working as expected.
Saving can always be triggered from the main thread by calling
save(options:) on the document.