I went through apple documentation also spent lot of time on SO and searching for resolution for this issue but I didn't get the answer for - WHY my iOS app's Share sheet (UIActivityViewController) shows very few share options compared to default apple apps while sharing PDF?
Is access to all the possible apps to share PDF is only limited to Default apple apps and not to the other developers apps?
As per my knowledge my code is correct but not sure if I am missing anything, so reaching out to wider audience if anyone knows how to handle this and get/have access to all possible apps in share sheet in our custom apps same as default apple apps for PDF's.
[NOTE : In my app only, I can see other possible options when I try to share Image but its not the case for PDF]
Below is my code and also added screenshots for quick reference:
@objc private func handleShare() {
let activityViewController = UIActivityViewController(activityItems: [getPDFData()], applicationActivities: nil)
self.present(activityViewController, animated: true)
}
private func getPDFData() -> Data {
guard let pdfURL = Bundle.main.url(forResource: "IssueDetailsPDF", withExtension: "pdf") else {
return Data()
}
return pdfdata
}