Questions tagged [uidocumentpickerviewcontroller]

177 questions
0
votes
1 answer

documentPicker:didPickDocumentsAtURLs: called twice when opening a single file

Using the simulator, running iOS 13.5, I encountered an intermittent, hard to reproduce issue whereby upon opening a file using UIDocumentPickerViewController (mode: UIDocumentPickerModeOpen), I get two documentPicker:didPickDocumentsAtURLs: calls…
0
votes
0 answers

Registered font not getting after reopen application

I am using Font from UIDocumentPickerViewController and I am successfully registered font and also get UIFont.families. But once I kill the application and then reopen application then I can not get that font in UIFont.families. I used bellow…
0
votes
0 answers

Customize UIDocumentPickerViewController NavigationBar

I am trying to customize UIDocumentPickerViewController NavigationBar but am not able to change the appearance of the navigation bar of UIDocumentPickerViewController. Only tintColor is getting changed. Everything else remains as it is. In my app,…
0
votes
1 answer

iOS Copy Files to external device

I am developing an iOS App that will write files to an external device. I have installed and used UIDocumentPicker with the following code: let documentPickerController = UIDocumentPickerViewController(forExporting:…
0
votes
1 answer

Third-party storage inaccessible when DocumentPicker initialized with "public.folder" documentTypes

I am writing an iOS plugin for Unity in Objective-C. I have created a DocumentPicker which allows me to select Folders. However, it does not seem to have access to Third-party storage (such as OneDrive, DropBox, etc). I am certain I have the…
0
votes
1 answer

FileManager returns url with Nil instead of file on it

User picks document from UIDocumentPickerViewController that i will be working with later. Document picker delegate calls and gives me url for file, but there is no file at all. This is how i create documentPicker. I use supportedFiles because…
dandand
  • 3
  • 1
  • 4
0
votes
1 answer

Missing "Select" option to select multiple files in UIDocumentPickerViewController

Does anyone know why there is no Select option when tapping 3 dots in UIDocumentPickerViewController like it is in a Files app? Even if multipleSelection is set to true. I noticed that it appears on simulator, but not on the real device. private…
stackich
  • 3,607
  • 3
  • 17
  • 41
0
votes
1 answer

How to detect that UIImagePickerController or UIDocumentPickerController window is opened

I am displaying overlay custom view in my app. I find the key window, and I add my overlay custom view to the key window's subview. And I set the overlay custom view's layer.zposition to 1. When I open the UIImagePickerController or…
0
votes
1 answer

UIDocumentPickerViewController configuration for Mac Catalyst

When using UIDocumentPickerViewController with Mac Catalyst, are additional capabilities, permissions or sandbox configuration required? Have I missed a caveat? Running the following code on macOS (11.4) with Catalyst, the didPickDocumentsAt:…
0
votes
1 answer

Change name of pdf file programmatically after user selects it from Document Picker

I have implemented Document Picker. Users can only pick pdf files. When the user selects pdf from Document Picker I get the file location of that pdf file. Ex. file://somepath/pdffile.pdf. Once I receive this file location URL, I want to change…
0
votes
0 answers

UIDocumentPickerViewController unusable - The requested app extension could not be found

I am seeing the following error while trying to use UIDocumentPickerViewController in the simulator: This in a production app that used to work fine. It reproduces in a minimal xcode project with one button that launches…
Amos Joshua
  • 1,601
  • 18
  • 25
0
votes
0 answers

Creating a file in a folder picked by UIDocumentPickerViewController

I am trying to create multiple files in a folder picked by user using UIDocumentPickerViewController with UTType.Folder. I am able to create subfolders by appending to the NSUrl and using NSFileManager createDirectoryAtURL, but there is no…
Martin Zikmund
  • 38,440
  • 7
  • 70
  • 91
0
votes
2 answers

UIDocumentPickerViewController when initialized in a framework shows files as grayed out

I want to initialize an UIDocumentPickerViewController from a framework. But, the files (.pdf) are shown as grayed out in the document picker when using below code in framework. The code works fine when UIDocumentPickerViewController is initialized…
Dhanesh KM
  • 449
  • 2
  • 7
  • 18
0
votes
1 answer

Why is UIDocumentPickerViewController working on iOS, but showing the wrong folder on Mac Catalyst?

The code below works fine on an iPad or iPhone -- saveDocument() (see below) writes to /Users/me/Library/Containers/My-App/Data/Documents, and openDocument() shows me the content of that folder. On macOS, however, openDocument() shows the Documents…
0
votes
0 answers

Permission Denied when read a local file using Data(contentsOf: URL)

The file I'm reading is (let data = try Data(contentsOf: url) ...) url: file:///var/mobile/Containers/Data/Application/15666F33-0EA8-4F1B-BFBA-634EEE9FC97D/Documents/Attachments/Documents/test.numbers But an error was caught which says Permission…