Questions tagged [uimanageddocument]

UIManagedDocument is a concrete subclass of UIDocument that integrates with Core Data. When you initialize a managed document, you specify the URL for the document location. The document object then creates a Core Data stack to use to access the document’s persistent store using a managed object model from the application’s main bundle.

The persistent store coordinator is set up automatically for you and you can configure it using it's persistentStoreOptions property. -you can use it as a data container, not just for documents. -you can listen to state and store content changes, which makes iCloud syncing easier

Read Apples documentation or an article by Erica Sadun. There is also a great demo video from Stanford Universities Paul Hegarty - check the Core Data demo on iTunes U.

188 questions
1
vote
1 answer

Detect below string using regex in uima RUTA

I'm trying to annotate below string as a type using regex in UIMA RUTA. SAMPLE: *******$10.00* Other Variant: *******$10.00*** *******$90.00* *******$99** Regex: *+\$\d+.\d+*+ UIMA REGEX: SPECIAL{REGEXP("\\*+\\$\\d+.\\d+\\*+") ->…
Gaurav
  • 139
  • 1
  • 16
1
vote
2 answers

Core Data crash when adding new Attribute of existing Entity in a new version

I have a Core Data Database in my app using UIManagedDocument, and added a new version on top on an old one. The new version works no problem if I'm adding new Entity without altering old Entity. But once I added a new attribute to an existing…
John
  • 2,672
  • 2
  • 23
  • 29
1
vote
3 answers

-[NSError retain]: message sent to deallocated instance

With Zombies enabled, I'm getting the error in the title (message sent to deallocated instance of NSError) on the following saveToURL call: [aDocument saveToURL:aDocument.fileURL forSaveOperation:UIDocumentSaveForOverwriting completionHandler:^(BOOL…
1
vote
1 answer

Gap between segueing to view controller and its contents showing - UIDocument

I have a method called useDocument which runs when the property (a UIDocument subclass called ‘document’) of my view controller gets set. Here’s the method: - (void)useDocument { if (![[NSFileManager defaultManager]…
Adam Carter
  • 4,741
  • 5
  • 42
  • 103
1
vote
0 answers

CoreData with shared UIManagedDocument - Cocoa error 134030: No such file or directory

In my iOS 7+ app I'm using Core Data with a single shared UIManagedDocument. I know that this approach is not recommended anymore and that one should use standard Core Data stack, but I would love to know what is happening in this case. As I said,…
damirstuhec
  • 6,069
  • 1
  • 22
  • 39
1
vote
1 answer

Multiple UIManagedDocument For Read & Write

I'm building a tab bar application for iPhone and i'm using Core Data with two UIManagedDocuments. In the first tab, i write the data to database and in the second i read them into UITableView with UIFetchedResultsController. At the start of…
Anamort
  • 341
  • 4
  • 17
1
vote
1 answer

UIManagedDocument file being automatically deleted with saveToURL:forSaveOperation:completionHandler:

I'm using Core Data with UIManagedDocument for an inventory-keeping app. The problem I'm having is that the "saveToURL:..." method is actually deleting my UIManagedDocument file in the Documents directory when I save using…
mp808
  • 21
  • 3
1
vote
0 answers

Adding iCloud sync to iOS to Document based app as of May 2014?

To further my basic learning, I've read quite a lot over the past few days on adding iCloud back-up and/or more advanced syncing features to an existing app which uses UIManagedDocument to get its Core Data stack. I'm seeing that some people are…
vapul
  • 77
  • 8
1
vote
1 answer

Customize the location of the persistent store of a UIManagedDocument

Is it possible to customize the location of the persistent store file of a UIManagedDocument? Normally, UIManagedDocument imposes the following document structure: Document package - StoreContent -- persistentStore I need the structure to…
EJV
  • 1,009
  • 1
  • 10
  • 17
1
vote
1 answer

App stops debugging if I change the iCloud switch under Documents And Data. Keeps running on the Phone

I am integrating iCloud in my App using an UIManagedDocument. The PSC options are set when the document is initialized, and because I am debugging I always force the app to use iCloud whithout asking the user. Everythings seems to work as expected…
nico9T
  • 2,496
  • 2
  • 26
  • 44
1
vote
1 answer

Transitioning iOS app to completely new core data data model

I have inherited an iOS app that needs to undergo major, major changes. In its current form, it uses a single UIManagedDocument (not synced with iCloud, but just used to avoid Core Data boilerplate) to store user data. I need to make drastic changes…
Shinigami
  • 2,123
  • 23
  • 40
1
vote
1 answer

Core Data migration from UIManagedDocument to normal stack

I've just started working on an app that uses UIManagedDocument for persistence. As far as I can tell, the only reason UIManagedDocument was used was to take advantage of it automatically setting up a core data stack. Now, I need to change the data…
Shinigami
  • 2,123
  • 23
  • 40
1
vote
3 answers

Proper use of iCloud fallback stores

I am working on a lightweight wrapper for UIManagedDocument which manages the existence of multiple documents in a person's iCloud account. See: APManagedDocument I am relying heavily on the use of fallback stores in iOS 7 and caring as little as…
dtrotzjr
  • 928
  • 5
  • 18
1
vote
2 answers

How to manage a big ManagedObjectModel with 6 entities and relationships? Core Data

I would like to know how to manage a big Core Data ManagedObjectModel like this, but with more attributes in every entity. Proyectos(means Projects) and Desarrolladores(means Developers) will be a Table View. The other entities will be only items. I…
croigsalvador
  • 1,993
  • 2
  • 24
  • 47
1
vote
0 answers

migrate uimangeddocument from icloud to local (and back)

I can create UIManagedDocument for icloud/local: - (UIManagedDocument *)initWithFileURL:(NSURL *)url isCloudEnabled:(BOOL)isCloudEnabled { self = [super initWithFileURL:url]; if (self) { NSDictionary *options; if (isCloudEnabled) { …