let shareActivity = UIActivityViewController(activityItems: [page.dataRepresentation], applicationActivities: nil)
if UIDevice.current.isIpad() {
shareActivity.popoverPresentationController?.sourceView = self.homeController.view
shareActivity.popoverPresentationController?.sourceRect = CGRect(
x: self.homeController.view.bounds.size.width / 2,
y: self.homeController.view.bounds.size.height,
width: 0,
height: 0
)
}
shareActivity.completionWithItemsHandler = { _, _, _, _ in
}
self.homeController.present(shareActivity, animated: true)
I use pdfkit, no matter from page.dataRepresentation
or document.dataRepresentation
, I cannot share PDF.
What do I need to do to share directly without saving the file locally, then [path.url]