3

I'm trying to find a way to know which app the user has selected when importing/opening a file in the picker.

documentPicker:didPickDocumentAtURL: gives a UIDocumentPickerViewController object back. I looked in it but no object has the information needed. In documentMenu:didPickDocumentPicker: there's an NSExtension object in it which contains information only about an Apple extension ("com.apple.UIKit.fileprovider.default"), but none about the extension that was actually used to get the file from.

Thank you!

rmaddy
  • 314,917
  • 42
  • 532
  • 579
Geva
  • 820
  • 6
  • 14
  • can u pls explain in detail ? do u want to know the user selction from documentinterac controller ? – Teja Nandamuri Oct 27 '15 at 13:04
  • I want to know which app did the user choose his file from. For example if he has both iCloud and Dropbox installed, he can choose a file from either. I want to know which one he used. I'm not talking about the document interaction controller, but on the UIDocumentPickerViewController. – Geva Oct 27 '15 at 13:07
  • why don't you use UIDocumentMenuViewController? – Pravin S. Oct 27 '15 at 14:50
  • You only know the URL of the file the user picked. The API doesn't tell you the provider/extension. – rmaddy Oct 27 '15 at 15:36
  • @PraWin.S I do. From its delegate I open the UIDocumentPickerViewController. – Geva Oct 27 '15 at 15:56

0 Answers0