177 questions
1
vote
1
answer
74
views
UIDocumentPickerDelegate method(didPickDocumentsAt) not called on a real device; but it works fine on the simulator
I'm trying to use UIDocumentPickerViewController. It works fine on the simulator and also on a real device in debug mode.
I've tried replacing didPickDocumentAtURL with didPickDocumentsAtURLs but it ...
1
vote
1
answer
561
views
Standard UTType for Word Docs with UIDocumentPickerViewController?
I'm updating some old code to avoid deprecated stuff and to use new APIs with UIDocumentPickerViewController. I used to have to list a bunch of custom strings for various file types like so:
NSArray&...
1
vote
1
answer
268
views
How to use UIDocumentPickerViewController inside a ContainerView?
I am displaying a UIDocumentPickerViewController inside a containerView so user can pick document while being able to interact with other controls on the screen. It works and the ...
0
votes
0
answers
47
views
UIDocumentPickerController doesn't show cancel button
For the app I am currently working on I want to open a UIDocumentPickerController as a full screen popover. It works great but when the app is in split screen and not in the compact horizontal size ...
0
votes
1
answer
550
views
How to get saved file name from UIDocumentPickerViewController on export
I'm saving a file using UIDocumentPickerViewController, by having it move and rename a file from a temp location:
UIDocumentPickerViewController* documentPicker = [[UIDocumentPickerViewController ...
1
vote
0
answers
88
views
UIDocumentPickerViewController custom uti for .apk file but can't work only in iOS 16.1
I have a UIDocumentPickerViewController with the following code:
if #available(iOS 14.0, *) {
let apkType = UTType("com.coocaa.apk")
let docPickerVC = UIDocumentPickerViewController(...
3
votes
1
answer
421
views
Porting UIDocumentPickerViewController into SwiftUI and I keep getting Error Domain=_UIViewServiceErrorDomain Code=1
Am porting over my UIDocumentPickerViewController into SwiftUI and whether I pick a file or cancel the picker I keep getting the error:
[DocumentManager] The view service did terminate with error: ...
1
vote
1
answer
594
views
FileImporter / UIDocumentPickerViewController not showing contents
Both the .fileImporter function (in SwiftUI) and the UIDocumentPickerViewController are shown as intended, but the do not show any contents.
Instead it says: "Content not available" on the ...
0
votes
1
answer
387
views
What is an iOS 16-compatible way of turning a list of uniform type indicator strings (e.g., ["public.text", "public.image"]) into a list of UTType?
My app has a list of supported uniform type indicator (UTI) strings:
public static let supportedUTIs = ["public.text", "public.image", "com.adobe.pdf", "public....
4
votes
0
answers
280
views
How to open the root folder with UIDocumentPickerViewController
I want to show most root folder with UIDocumentPickerViewController on presentation.
UIDocumentPickerViewController has directoryURL feature. But I can't access the URL i want to access.
Example usage ...
0
votes
0
answers
159
views
Strange ios error showing UIDocumentPickerViewController (or some popups)
I have an iOS app using SwiftUI to develop its views.
With some native popups (as the one of SKStoreReviewController.requestReview(in: windowScene) and the Files App Browser I'm getting a strange ...
0
votes
0
answers
165
views
ios UIDocumentPickerViewController is not remembering last folder
I have a pretty simple swift code to open Files app and let the user browse to any folder and pick a file.
func goToFilesApp() {
var documentPicker: UIDocumentPickerViewController
if #...
-1
votes
1
answer
411
views
How to use UIDocumentPickerViewController to import files in iOS 16
I was trying to use the UIDocumentPickerViewController to import some pdf files in my Swift UIKit App. I'm not able to properly use the UIDocumentPickerViewController to display the files app and ...
0
votes
0
answers
134
views
Strange and unusable URLs when using UIDocumentPickerViewController to access iCloud directories/files
I have an iOS application that uses UIDocumentPickerController to present the user with a dialog where they can pick the location of a directory containing files for upload
This is working just fine ...
0
votes
1
answer
258
views
UIDocumentpicker Content are greyed out
I’m using UIViewControllerRepresentable for Document picker presentation in swiftUI. The issue is that I'm not able to select the video audio pdf it's all showing in a frozen manner. I need to fix ...
-1
votes
1
answer
792
views
Enable save button when exporting a file to app folder in Files app
When I want to save a file to my App folder in iCloud, the save button is disabled, but it is enabled in other directories. Is there a way to enable it?
My code:
//...
let urls: [URL] = [fileURL]
...
1
vote
1
answer
665
views
How to reproduce UIDocumentUIPickerViewController NSCocoaErrorDomain Code=260?
I am presenting the UIDocumentUIPickerViewController from a view controller like this:
let documentPicker = UIDocumentPickerViewController(
documentTypes: [String(kUTTypePDF), String(kUTTypeImage)], ...
0
votes
2
answers
715
views
Move file from app to phone documents folder
So in my app I have created a Test.JSON file that I want the user to be able to move to the documents directory, outside of the app. I understand I have to do this by using ...
1
vote
1
answer
1k
views
How is it specific use UIDocumentPickerViewController in SwiftUI
Have this code:
struct ContentView: View {
var d1: [String: Any]? = nil
var res: ValidationResult?
let documentPicker = UIDocumentPickerViewController(forOpeningContentTypes: [.jpeg, ....
0
votes
0
answers
207
views
Importing '.db' files using UIDocumentPickerViewController
I am trying to import .db files using UIDocumentPickerViewController. Only need to show files with db extension (eg: sample.db) in document picker.
There is an option to provide document type as ...
2
votes
1
answer
1k
views
UIDocumentPickerViewController - open Folder by directoryURL
In short: I am currently working on an app with which you can scan a QR code. The QR code contains a path to a folder in Apple's own "Files" app. And in this folder I would like to view the ...
1
vote
0
answers
331
views
UIDocumentPickerViewController - jump to target folder with directoryURL
I want to access a PDF file in a folder just to open the PDF file. When opening the UIDocumentPickerViewController, I want to open the target folder directly in which the file is stored. With the ...
0
votes
1
answer
224
views
How to access user selected folder in iOS
I'm looking for an iOS API that allows accessing a user-selected folder in place (without importing it). It seems to be possible with native frameworks from Apple. How I expect it to work:
User ...
2
votes
0
answers
1k
views
Importing the selected file from DocumentPicker into the application [SwiftUI]
I want to take the path of the folder or file I selected from Document Picker and move it to the "Folder" of my own application with FileManager. However, I am getting this error.
I want to ...
0
votes
1
answer
954
views
How can I copy a file from DocumentPicker to my own application?
I'm asking the user to select an image or file in the "Folder" application in iPhone with DocumentPicker. How can I transfer this selected file or image to my own application?
I got this ...
1
vote
1
answer
201
views
Getting UIDocumentPickerViewController to only allow the selection of binary data files on iOS 13
My app is stuck at iOS 13 for the time being, and I can't get the UIDocumentPickerViewController only to allow the selection of binary files.
This is what I'm putting into my info.plist
<key>...
0
votes
0
answers
259
views
How to upload Pdf, Docs, txt, Images in Firebase Storage using Swift
I'm trying creating a iOS app where the user can upload pdf, images, docs etc...,
This is my code - it works just one time; when I try again I get the error shown down below.
I don't understand why - ...
1
vote
0
answers
473
views
UIdocumentPickerViewController doesn't pick PDF's from the simulator
Here is the code that presents the picker when clicked on a button. I've tried the same on a different mac device and it worked just fine. Not sure what's different. Any help would be appreciated. ...
1
vote
1
answer
815
views
Reading file inside documentPicker returns nil
I am reading a plist file selected by the user in iOS swift. The code works as expected on XCode simulators (iPhone 13). But on a real iPhone 13, the readArrayFromPlist function returns nil. I couldn’...
0
votes
1
answer
3k
views
Unable to select files form UIDocumentPickerViewController
I am working on UIDocumentPickerViewController() in Swift. After opening the document picker the files and images look blurred and I can't select any of them. I have attached the screenshot and the ...
0
votes
2
answers
537
views
Unable to save images to Egnyte/Google Drive/Dropbox - Swift/Xcode
UPDATE
I tried the following code solution and it allows for me to save to Google Drive now, but Egnyte and Dropbox are still greyed out.
func exportPhotosToFileLocation() {
var fileURLArray = ...
1
vote
0
answers
587
views
How can I add files to the iOS simulator in a CI environment?
I would like to include a UI test in my project that exercises its interaction with UIDocumentPickerViewController. The test will need to run on a CI machine, which needs to be able to wipe the ...
4
votes
1
answer
2k
views
How to read files of External Mass Storage Devices Without DocumentPicker? (iOS)
Just to give some context, there is an iOS app I'm building (in Xamarin) that requires the ability to fetch files (in an automatic way without having the user to navigate to the files and select them ...
0
votes
1
answer
307
views
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 ...
0
votes
0
answers
409
views
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 ...
1
vote
0
answers
354
views
How do I change the text of the "open" button in UIDocumentPickerViewController?
I've got an iOS app using the document picker view. Image demonstrating the button
When testing it however, I get the text "done" instead of what ideally would be "open" in the ...
2
votes
2
answers
2k
views
SwiftUI: Display file url from Array after user Picks file using DocumentPicker
I followed a tutorial on getting Url from a Document a user chooses and be able to display it on the View. My problem now is I want to add those Url's into an array. Then get the items from the array ...
3
votes
3
answers
4k
views
How to use UTType with a UIDocumentPicker (pages? docx?)
I'm trying to open a picker with only certain file types allowed.
I'm using this documentation to find the UTType I need:
https://developer.apple.com/documentation/uniformtypeidentifiers/uttype/...
10
votes
3
answers
15k
views
How to get All Extensions for UTType Image, Audio, and Video
Is there a way to get All of the different UTType extension types as Strings? I need them specifically for images, audio, and video.
I followed this answer, but it doesn't give me all of the ...
0
votes
0
answers
176
views
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 ...
12
votes
2
answers
7k
views
UIDocumentPickerViewController - 'init(documentTypes:in:)' was deprecated in iOS 14.0
Method is deprecated from iOS 14, so need support for both iOS 14 and later. And iOS 13 and earlier.
1
vote
1
answer
3k
views
Choose destination when saving file
Is it possible to make user able to choose a destination for the file that he wants to download, something like DocumentPicker which you can use when choosing a file to upload?
I want something like ...
2
votes
1
answer
923
views
how to initalise UIDocumentPickerViewController noting "forOpeningContentTypes" (from doco) seems to be deprecated in IOS?
When following the onsite IOS documentation for UIDocumentPickerViewController in Xcode 12.5.1 with IOS 14.5 deployment target I get an error:
Incorrect argument label in call (have '...
0
votes
1
answer
356
views
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 = ...
0
votes
1
answer
211
views
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 ...
0
votes
1
answer
548
views
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 ...
0
votes
1
answer
370
views
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 ...
0
votes
1
answer
167
views
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 ...
0
votes
1
answer
621
views
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....
1
vote
2
answers
583
views
How could one produce an icon from a document (based on file type), selected via UIDocumentationPickerController?
I am new fairly new to swift development but am obsessed and in love with learning, I have not only dedicated myself to learning but I am starting to apply my knowledge and have built a small ...