Questions tagged [uidocument]

UIDocument represents a user-editable document in an iOS application. It is an abstract base class in the UIKit framework. When it is used, its subclass takes the role of the model of a model-view-controller application. Because it implements the NSFilePresenter protocol, it significantly simplifies writing a document-based iOS application. Its Mac OS counterpart is NSDocument.

UIDocument represents a user-editable document in an iOS () application. It is an abstract base class in the UIKit () framework. When it is used, its subclass takes the role of the model of a model-view-controller application. Because it implements the NSFilePresenter protocol, it significantly simplifies writing a document-based iOS application. Its Mac OS () counterpart is NSDocument ().

To learn more, see the Document-Based App Programming Guide for iOS.

268 questions
0
votes
1 answer

Swift UIDocumentInteractionController doesn't use device language

I'm trying to delegate the opening of a file my app created to an other app using the UIDocumentInteractionController within an UIAlertAction like this: // variable in the class var documentController:UIDocumentInteractionController! // the…
0
votes
1 answer

Opening Sibling Files in Document Based iOS App

I want to have a custom project file that a user selects in a UIDocumentBrowserViewController. That project file would then reference files in the same directory which would be opened and written to programmatically. I can't seem to get access to…
rawbee
  • 2,946
  • 3
  • 18
  • 22
0
votes
1 answer

Get localizedName from UIDocument without downloading entire document?

I have a UIDocument-based app which shows a list of documents stored in iCloud. I'm getting their filenames (for displaying) from the NSMetadataItem with metadataItem.value(forAttribute: NSMetadataItemDisplayNameKey). The documents contain a string…
Josh Paradroid
  • 1,172
  • 18
  • 45
0
votes
1 answer

Why is dismissing uinavigationcontroller not releasing view controller memory?

Implementing UIDocumentBrowserViewController in an existing app. This vc, in iOS 11 is the root view controller, and tapping a file creates my doc, instantiates my view controller, and presents it inside a UINavigationController. It all works, in…
JKaz
  • 765
  • 6
  • 18
0
votes
1 answer

Master View Cell Labels Blank When Starting In Landscape

The cell labels are blank in the master view of a default Master Detail View when starting in landscape orientation of an iPad 2 simulation. If I reload the master view in its controller's viewWillAppear function, everything is as it should be only…
michaelgill1969
  • 131
  • 2
  • 9
0
votes
1 answer

(Why) Should I keep a pointer to the FileWrapper in the open document?

I have a working document based project with both iOS and macOS targets. The document is a bundle and I have each target able to open files from the other. I was looking at some online tutorials on UIDocument (and particularly this one from…
Jef
  • 4,728
  • 2
  • 25
  • 33
0
votes
1 answer

UIDocument/Xcode configuration

I am trying to follow this tutorial... https://www.raywenderlich.com/131668/document-provider-tutorial I got to this part ... But I cannot figure out where I find this in Xcode 8.0 which means I get this error message ... Sorry I am sure this is…
user3069232
  • 8,587
  • 7
  • 46
  • 87
0
votes
1 answer

files saved as package (with filewrappers) and icloud drive, are they zipped when emailed?

I have an app which uses UIDocument and writes data using filewrappers: public override func contents(forType typeName: String) throws -> Any { print("******writing the contents******") print("**** typeName = \(typeName)") let result…
Jan
  • 1,582
  • 1
  • 13
  • 19
0
votes
1 answer

closeWithCompletionHandler has odd results when executed from background thread

I am having trouble with some batch document processing in iOS and was hoping I could get some help here. The process I'm trying to implement uses an input directory on iCloud drive, pulls all of the documents there, and adds one record into the…
joseph ruth
  • 219
  • 2
  • 12
0
votes
1 answer

Read iCloud Drive into iOS, write to iCloud Drive so it is visible on Mac

I am trying to accomplish the following: Read a .csv file from iCloud drive that was placed there using the Mac. This works using UIDocumentPickerViewController. Process the file in iOS - this works fine Create the documents directory for my App in…
Rob
  • 757
  • 1
  • 10
  • 26
0
votes
1 answer

iOS and OSX Document Packages cross platform

I have a iOS and OSX application which is document based and i am saving complex folder hierarchy inside the document so i change my UTI type to document package. But the problem is that according to apple Document Package is just a folder. If i…
shahid610169
  • 370
  • 2
  • 11
0
votes
1 answer

iCloud not recognizing packages until device restart

Our UIDocument based app has a custom document type defined in the info.plist under the “Exported Type UTIs” and “Document types”. We are creating UIDocuments in the iCloud ubiquity container as per Apple documentation. The documents are not getting…
Chandan Shetty SP
  • 5,087
  • 6
  • 42
  • 63
0
votes
1 answer

saveToURL in UIDocument returns false

I am executing this function to save an UIDocument both with iCloud enabled and disabled but I seem to miss on both throws. In particular when iCloud is eanbled saveToURL return false, and I have no idea why it so, given the document is not nil and…
Fabrizio Bartolomucci
  • 4,948
  • 8
  • 43
  • 75
0
votes
1 answer

Why is Swift 2.0 Compiler throwing error on UIDocuments loadFromContents

The following UIDocument Class method override throws a compiler error: import UIKit class MyDocument: UIDocument { override func loadFromContents(contents: AnyObject, ofType typeName: String) throws -> Bool { return true } } Error…
R Bingham
  • 1
  • 3
0
votes
1 answer

UIDocument VS CoreData External Binary Data VS File Manager

I have an iOS 7 app, that is using Core Data. Some of the Core Data objects has a related (one to one relationship) images that are > 1MB & < 4MB and are stored in the app’s Document folder. Core Data objects only stores image names as string. I…
sash
  • 8,423
  • 5
  • 63
  • 74