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
0
votes
1 answer

is it OK to handle a Core Data database created with from an UIManagedDocument with NSFileManager?

I'm making an app which uses Core Data, and for the purpose of my app I need to bundle a pre-populated database with the app bundle. I'm using a UIManagedDocument For this, I created the database with the app and later loaded the data. Then I…
tomidelucca
  • 2,543
  • 1
  • 26
  • 26
0
votes
1 answer

UIManagedDocument: How to perform saving in background

I have a Table View hooked up to a NSFetchedResultsController, and the corresponding managedObjectContext is self.myDatabase.managedObjectContext: self.fetchedResultsController = [[NSFetchedResultsController alloc] initWithFetchRequest:request …
0
votes
3 answers

UIManagedDocument with NSFetchedResultsController and background context

I am trying to get the following working. I have a table view that is displaying data fetched from an API in a table view. For that purpose I am using a NSFetchedResultsController: self.fetchedResultsController = [[NSFetchedResultsController alloc]…
0
votes
2 answers

UIManagedDocument does not update changes of relationships immediately

I'm using an UIManagedDocument in my project and have to change the relationship of existing objects. All objects already exist in the database so I'm not dealing with the temporaryID/permanentID issue. I'm also almost using updateChangeCount: on…
Florian Mielke
  • 3,310
  • 27
  • 31
0
votes
1 answer

How to correctly initialize, use and save a UIManagedDocument

I'm dealing to get my app work using a UIManagedDocument. I posted another question few days ago, but I haven't gotten it working yet. Let's see if I can do this better. My app needs to load some data from a plist file and fill the database with it.…
David
  • 99
  • 2
  • 11
0
votes
1 answer

How to retrieve an UIManagedDocument from a known url / file path?

My purpose is to retrieve a UIManagedDocument object from an known url and then open it. Something like: UImanagedDocument *doc = retrieveDoc(url); then, I can do something like: [doc openWithCompletionHandler:^(BOOL success){ ....}]; Believe me…
WHT
  • 63
  • 1
  • 7
0
votes
2 answers

iOS - Core Data - before successful creation / opening

Overview I have an iOS project in which I store a list of names in a table view. I understand the moment the database is opened / created, there is a completion handler to execute a method. Steps: In my case, the first screen is a table view which…
user1046037
  • 16,755
  • 12
  • 92
  • 138
-1
votes
1 answer

How to make journal mode to WAL in IOS 6.0 with UIManagedDocument

I am using UIManagedDocument in my Core Data, and I want to use journal mode to WAL in IOS 6.0... how to do that ?
Yasser Farrag
  • 307
  • 2
  • 12
1 2 3
12
13