Questions tagged [uidocumentbrowserviewcontroller]
19 questions
8
votes
0 answers
Let user pick document type to create when using SwiftUI & DocumentGroup
My document-based app supports several different file types. It is currently written in SwiftUI using a UIDocumentBrowserViewController. I'm trying to convert to the new SwiftUI (v2) DocumentGroup paradigm in which you don't directly use a…

Mark Krenek
- 4,889
- 3
- 25
- 17
5
votes
1 answer
Selecting folders with UIDocumentBrowserViewController
I'm developing a new app and I would like the user to be able to select a folder from iCloud or an external drive. How can I allow them to select a folder using a UIDocumentBrowserViewController?
I have tried setting the allowedContentTypes to the…

William Taylor
- 691
- 8
- 23
4
votes
1 answer
Document browser app in iOS 15 keeps creating iCloud drive folder
I have had a document browser app up since iOS 11 (using UIKit/UIDocumentBrowserViewController). The app (let's call it "MyApp") used to create a "MyApp" folder in iCloud Drive (and/or on the device, depending on the choice made in Settings), where…

emime
- 65
- 7
3
votes
1 answer
Hide file extension in document based app - DocumentGroup & UIDocumentBrowser
I've been working on a document-based app for well over 12 months now. It's out on the store, and everything is going well so far except for something I have been unable to solve since iOS 13.
The built-in file viewer shows all my apps files with…

Beau Nouvelle
- 6,962
- 3
- 39
- 54
3
votes
1 answer
Getting a sourceRect for UIActivityViewController from a UIDocumentBrowserViewController
I am trying to add a custom activity to my UIDocumentBrowserController long-tap menu - a UIActivityViewController. The default share activity, when selected, is pointing nicely to the icon of the file that the user just long-tapped.
How can I get…

Ron Regev
- 459
- 2
- 18
2
votes
1 answer
How to avoid strange behavior when scene-based document mac catalyst app reopens windows on app restart?
I have been struggling to get the mac version of a mac catalyst app to work. This is a scene-based, DocumentBrowserViewController based app that works fine on the iPad. On the Mac, it works fine, except if you close the app when one or more…

David Mann
- 91
- 3
2
votes
0 answers
Read files from other apps that shares documents folder, without UIDocumentBrowserViewController
I need some sort of file sharing functionality between two independent apps (cannot use AppGroup or something like that).
App1 should send to App2 n documents (n could be hundreds), App2 should elaborate these documents and send back to App1 the…

DSoldo
- 959
- 10
- 19
1
vote
0 answers
Weird display on UIDocumentPickerViewController or UIDocumentBrowserViewController
I recently got stuck on an UI problem that UIDocumentPickerViewController doesn't show correctly. See the picture below.
Also, I tried UIDocumentBrowserViewController, got the same result.
Has anyone encountered this problem?
Demo display on…

Eric Xu
- 11
- 2
1
vote
0 answers
Swift UIDocument saving unreliable
Why is calling .save on an external (iCloud) UIDocument so tricky? :frowning: It either:
takes forever and doesn't save, or
save operation fails, despite of calling
startAccessingSecurityScopedResource() prior to the save call.
saves sometimes,…

Akash Agarwal
- 2,326
- 1
- 27
- 57
0
votes
2 answers
What is the best strategy for saving a "Most Recently Used" document list on iOS?
Is there a foolproof way of saving the URL of a UIDocument so an application can resume editing the document on next launch?
I have tried various ways of saving the URL, but sometimes the document URL will slightly differ from what is expected.
For…

Gene Z. Ragan
- 2,643
- 2
- 31
- 41
0
votes
0 answers
UIDocumentBrowserViewController app : Refresh no of items in each folder
I am creating an UIDocumentBrowser based app and notice this issue:
Say I am viewing these folders:-
Folder 1 -> 20 items
Folder 2 -> 50 items
....
e.g If my app deletes all items in say Folder 2, "50 items" is still listed as in Folder 2. How to…

sydney888
- 1
- 1
0
votes
0 answers
How to write files with UIDcomentBrowserViewController
Is where a way to read/write multiple files in UIDocumentBrowserViewController.
Recently, I know UIDocumentBrowserViewController as rootViewController can read files. But how to write files.
For example, i want to read zip file and then unzip it to…

John Shu
- 3
- 4
0
votes
1 answer
Can a SwiftUI document based app show Firestore documents in the SwiftUI document browser directly?
Using Swift 5.3.1, Xcode 12.2, iOS 14.2.
Is it possible to directly access Firestore documents from within a DocumentGroup based iOS app?
I know that you can show the document browser with iOS 14 and SwiftUI. And it is also able to show iCloud or…

iKK
- 6,394
- 10
- 58
- 131
0
votes
1 answer
How to Save video file to iOS Files App using UIDocumentInteractionController
I want to write one or multiple mov/mp4 files to iOS Files App but can not find how to do it with UIDocumentInteractionController. Looking for a sample code to copy files to a subfolder of my app in iOS files app using…

Deepak Sharma
- 5,577
- 7
- 55
- 131
0
votes
1 answer
Make UIDocumentBrowserViewController immediately create new document on first launch
I have a Document Based app working well with UIDocumentBrowserViewController. However, for brand new users who have no documents it's a really confusing first experience to just be launched directly in to a document browser. I have made it detect…

andygeers
- 6,909
- 9
- 49
- 63