Questions tagged [uidocumentpickervc]

97 questions
74
votes
10 answers

Implement Document Picker in swift (iOS)

I want to pick a file of any type(.pdf, .docs, .xlsx, .jpeg, .txt, .rtf, etc) functionality in my iOS app. On clicking on Upload button, I want my app to open a directory and select files(DocumentsPicker) @IBAction pickDocument(sender: UIButton) { …
user4886069
37
votes
6 answers

Swift - Get file size from url

i am using documentPicker to get url path of any document and then uploaded to the database. I am choosing file (pdf, txt ..) , the upload is working but i want to limit the size of the file . public func documentPicker(_ controller:…
yasser h
  • 599
  • 2
  • 9
  • 18
26
votes
7 answers

UIDocumentPickerViewController returns url to a file that does not exist

I'm using UIDocumentPickerViewController to let the user select a file from iCloud Drive for uploading to the backend. Most of the time, it works correctly. However, sometimes (especially when the internet connection is…
imgx64
  • 4,062
  • 5
  • 28
  • 44
21
votes
5 answers

Swift write/save/move a document file to iCloud drive

I've been trying for over two days to write a file to iCloud drive. I have tried writing a simple text file directly, locally then moving it, using UIDocumentMenuViewController, etc. I'm not getting any errors with my code and stepping through…
Paul C
  • 261
  • 1
  • 2
  • 8
18
votes
4 answers

How to initialise UIDocumentPickerViewController with all type of UTIs

I want to open UIDocumentPickerViewController and It should allow user to select all type of files. I tried to mention all UTIs in UIDocumentPickerViewController init method still couldnt find valid UTIs for some of files like rar,Visio…
Murali
  • 1,869
  • 1
  • 14
  • 22
15
votes
1 answer

Not able to select multiple files using UIDocumentPickerViewController

I'm trying to import/pick multiple files at once from files app using UIDocumentPickerViewController. Tried setting allowsMultipleSelection = true but still there is no "Select" option while picker is presented. Code snippet…
Anand Kore
  • 1,300
  • 1
  • 15
  • 33
13
votes
2 answers

Add "Edit in Excel" or "Edit photo" extension

I checked the latest Dropbox and Excel for iOS. In Dropbox we get an edit button. On click it opens Excel's extension where you can edit the file. After save, changes are reflected in the Dropbox file too. I want to add such a button. Also I'd like…
Durgaprasad
  • 1,910
  • 2
  • 25
  • 44
12
votes
1 answer

UIDocumentPickerViewController - How to set the navigation bar color

I want to set the navigation bar background color of my DocumentPicker to be the same as the rest of my application. let filePicker = UIDocumentPickerViewController(documentTypes: ["public.content"], in: .import) filePicker.delegate = self …
Aguragorn
  • 585
  • 6
  • 14
12
votes
4 answers

My app is getting crashed on UIDocumentPickerViewController

I am working on file sharing on my iOS App, I am new to UIDocumentPickerViewController. I do not know why my app is crashing. UIDocumentPickerViewController *documentPicker = [[UIDocumentPickerViewController alloc]…
Anand3777
  • 448
  • 2
  • 5
  • 16
10
votes
4 answers

iCloud UIDocumentPicker crashes intermittently and hangs

Issue: When choosing a document from iCloud the application randomly crashes, for most of the time the following code will work, but on rare occasions it will fail. I have enabled iCloud entitlement in the app and can't seem to find the reason why…
AJ9
  • 1,256
  • 1
  • 17
  • 28
9
votes
2 answers

UIDocumentPickerViewController: how to open a given subdirectory

I am using UIDocumentPickerViewController with the import mode (UIDocumentPickerModeImport) in order to let the user import documents from cloud storage providers (dropbox, etc). Each time the user repeat the import process, he must browse through…
8
votes
1 answer

How to create a custom UTType and make it enable for UIDocumentPickerViewController?

I am creating an app in which there are custom file types such as .xyz file, which is not part of UTType API. Here are the case problems: I want to create a custom UTType with xyz extension. While opening file app, only those file should be enable…
Mont-iOS
  • 118
  • 1
  • 5
8
votes
0 answers

Downloading files in a folder selected by UIDocumentPickerController

I'm trying to download the files contained in a folder hierarchy picked by the UIDocumentPickerController. I use the URL I get from documentPicker:DidPickDocumentsAtURLs: with an NSFileCoordinator. For a folder provided by the iCloud Drive file…
7
votes
4 answers

UIDocumentPickerDelegate method(didPickDocumentsAt) not called by iOS

I have a query regarding delegate method not been getting called for DocumentPickerViewController, here's the background, I just need to import the resource whatever available from my Files App and for that reason i am using…
7
votes
2 answers

How to use Document Provider Extension?

I was learning a little more about ios extensions, such as: Today Extension Photo editing Extension Action Extension Custom keyboard Extension In all of them I did not have difficulties in learning, but recently I try to learn the "document…
LettersBa
  • 747
  • 1
  • 8
  • 27
1
2 3 4 5 6 7