Called when the destination has been handed over the generated files to share them.

@discussion For some actions that happen outside the host application, such as sharing to UIActivityViewController or Printing,
the fact that the error parameter is nil does not necessarily mean that the ultimate action was performed correctly, but that the
files were handed over to the destination process correctly.

Deprecated in PSPDFKit 8.2 for iOS. The returned value from this method is now discarded. Use -[PSPDFDocumentSharingViewControllerDelegate documentSharingViewController:filenameForGeneratedFileForDocument:destination:] to change the names of the generated files.

Note

The files this method returns are no longer used for continuing the share.

Notifies the delegate about the files that the document sharing view controller
is about to share.

You can use this method to alter the files that will be shared.

Note

If you’re going to be altering the files in any way, it is your responsibility to make sure the modified files are still valid, as PSPDFKit won’t do any file validation during the rest of the sharing process.

Asks the delegate for the filename that should be used for the generated files when sharing the given document.

This method is going to be called once per document being shared during the file crunching process. The returned name will be used to write the resulting document to disk. The name you return shouldn’t include the .pdf file extension.

Note

This method is only going to be called when sharing documents with PSPDFDocumentSharingFileFormatOptionPDF selected. Custom filenames for PSPDFDocumentSharingFileFormatOptionImage or PSPDFDocumentSharingFileFormatOptionOriginal are currently not supported.

Return Value

Called as the last step before the files are handed over to their destination.

Return NO to prevent the files from being handed over to the destination. This is useful if you wish to
handle the file sharing yourself if, for instance, you’re in a secure environment in which the default destinations do
not fit your needs.

Note

It is your responsibility to dismiss the sharing view controller if you decide to stop the sharing process.