2

Current implementation.

UIWebView is added to a view and file is loaded in that. Here I can control copy option with "UILongPressGestureRecognizer" and also control whether to allow sharing with other apps using "documentInteractionController presentOpenInMenuFromRect".

Problem

But MS word or Excel password protected files cannot be opened in UIWebView.

Solution

Solution I found to this protected file is open them using "qlpreviewcontroller" or "UIDocumentInteractionController"

But I cant figure out a way to still control thos copy and share with other apps behaviour.

Durgaprasad
  • 1,910
  • 2
  • 25
  • 44

1 Answers1

0

From Apple documentation: When a document is passed to another application, the contents of the document interaction controller’s annotation property are passed with it.

So, You can subscribe to UIDocumentInteractionController delegate and change annotation of UIDocumentInteractionController to pass additional data to application.

Determination of capability to open is made based on the document type (as indicated by the uti property) and on the document types supported by the installed apps.

If You want to filter list of applications check this question.

HereTrix
  • 1,315
  • 7
  • 13