How to Share PDF file in all eligable and appear iOS app?

匿名 (未验证) 提交于 2019-12-03 09:02:45

问题:

I am using UIActivityViewController for sharing PDF file, I have applied all code successfully to share .Pdf file, and when I see sharing sheet option there I can share or send my PDF file like Facebook, Gmail, Print, Copy etc but in my iPhone there some app also where we can share PDF file like WeChat, Open in iBooks, open in Hike, open in chrome etc but these option not shown on my share list like this image.

But when I use UIDocumentInteractionController then I saw all sharing option Facebook, Gmail, Wechat, open in iBooks, open in hike etc. All apps which support pdf shown as sharing option when I used UIDocumentInteractionController, show in below image.

But I want to use UIActivityViewController, and want to see all options which support PDF file like Wechat , open in iBooks, open in hike. Like this image....

So how can I do that using UIActivityViewController, which kind of excludedActivityTypes include in my pdf sharing file because I'm using almost all excludedActivityTypes like UIActivityTypePostToFacebook, UIActivityTypeMessage etc.

回答1:

You can do it by using "Share" extensions. May WeChat developers did not enable their Share extension for "pure" text content, like in the Notes app.That is reason you are not able to see that for sharing.You won't be able to add the WeChat Share extension on behalf of them if they didn't allow it, but you might be able to use some WeChat API to develop your own app extension with text content enabled.

For more information about "Share" extensions visit : https://developer.apple.com/library/prerelease/ios/documentation/General/Conceptual/ExtensibilityPG/ExtensionScenarios.html#//apple_ref/doc/uid/TP40014214-CH21-SW8

https://developer.apple.com/library/prerelease/ios/documentation/General/Conceptual/ExtensibilityPG/ExtensionCreation.html#//apple_ref/doc/uid/TP40014214-CH5-SW1

Try with this.



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!