且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在所有合格并显示iOS应用程序***享PDF文件?

更新时间:2023-02-01 16:41:51

您可以使用"Share"扩展名来做到这一点. 可能是微信开发人员未像Notes应用程序那样为纯"文本内容启用其Share扩展名.这是因为您看不到共享的扩展名.您将无法代表来添加WeChat Share扩展名.他们(如果他们不允许的话),但是您也许可以使用一些WeChat API来开发自己的启用了文本内容的应用程序扩展.

有关共享"扩展名的更多信息,请访问: https://developer.apple.com/library/prerelease/ios/documentation/General/Conceptual/ExtensibilityPG/ExtensionCreation.html#//apple_ref/doc/uid/TP40014214-CH5-SW1

尝试一下.

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.

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.