270 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
0
votes
0
answers
57
views
How to rename an open document in a SwiftUI DocumentGroup app with custom navigation?
I'm building a document-based SwiftUI app following Apple's Building a Document-Based App with SwiftUI guide. The app uses DocumentGroup and stores documents in iCloud Drive.
Important context: We're ...
0
votes
0
answers
48
views
UIDocument (UI Toolkit) menus don't show up in the game nor the XR Simulator window
None of the menus created via a UIDocument show up in the game nor the XR Simulator. I've tried building menus within the UI Builder. Also, loaded demos like QuizU. They all look fine in the Game view ...
1
vote
1
answer
149
views
What is a ubiquity container in iCloud Documents storage?
I have an app that stores user created JSON files successfully saving and loading to the local application documents directory. This directory is visible to the user. I would like to allow the user to ...
2
votes
1
answer
220
views
Renaming UIDocument using UINavigationItemRenameDelegate
I'm trying to rename UIDocument open via document browser (UIDocumentBrowserViewController).
You can rename open documents in Apple Pages and Apple Numbers, and they use the usual ...
6
votes
0
answers
684
views
How to resolve Error on closing document picker
Setting up a document picker where users can select PDF files from the 'Files app' and save this to my app document folder to use in the app.
Got the document picker to open, select file - but upon ...
0
votes
1
answer
124
views
UIDocumentBrowserViewController doesn't call localizedName or honor shouldShowFileExtensions
I am using Xcode 14.2 on macOS Ventura 13.2, working on an iOS app initially created from Xcode's template via New Project > iOS > Document App. I am using Objective-C, not Swift. I am testing ...
1
vote
2
answers
476
views
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 ...
3
votes
0
answers
54
views
iCloud Drive: NSDocument.revert(toContentsOf:ofType:) called when document is merely opened on another device
I have a macOS and iOS app, based on NSDocument and UIDocument respectively.
They synchronize their documents via iCloud Drive.
I noticed that NSDocument.revert(toContentsOf:ofType:) is called on the ...
5
votes
0
answers
802
views
How to use iOS security scoped bookmarks across devices?
On iOS (14/15) I'm trying to pass security scoped bookmarks to user picked files on iCloud Drive between devices but whatever I try: I cannot get urls to be restored on another device running the same ...
0
votes
0
answers
358
views
Proper way to check if URL points to directory or file (uncluding FileWrapper)?
I am looking for a proper way to definitively check if an URL points to a file or a directory. Files should include filewrapped data like UIDocument using a FileWrapper to wrap its underlying ...
0
votes
3
answers
134
views
UIDocument saveToURL deletes original file
I'm trying to use -[UIDocument saveToURL:(NSURL *)url forSaveOperation:(UIDocumentSaveOperation)saveOperation completionHandler:(void (^ __nullable)(BOOL success))completionHandler] to save a ...
1
vote
1
answer
1k
views
DocumentPicker got NULL for file
I tried to get Data of the Document but I only get Null.
Documentpicker is working, except: The Selected Data is NULL.
async openDocumentReader() {
try {
const res = await DocumentPicker....
1
vote
0
answers
109
views
UIDocument synchronous read - completion handler stalled in dispatch
I tried multiple ways of wrapping a file read within a synchronous method call (including using multiple queues, specifying target queues, setting up an NSThread and signalling with NSCondition's, ...
0
votes
0
answers
738
views
NSURL URLByAppendingPathExtension Crash
The following code ran fine on iOS 14.0, but now on iOS 15.0, causes a crash.
var noteFile: NoteFile!
func saveToNoteFile(completion: ((Bool) -> Void)?) {
let mutableAttrs = ...
1
vote
0
answers
276
views
How to prevent file name conflict when saving UIDocument to new URL without FileManager
Using FileManager it is possible to check if a file exists using the FileManager method fileExists(atPath:) when saving files to the App Sandbox.
However, when working directly with UIDocument the ...