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

Singleton UIManagedDocument is not writing transaction logs to cloud

I have an app that uses a single UIManagedDocument as the data store which I access through a singleton using the method in Justin Driscoll's blog. This works fine, but when I set my ubiquity keys for the persistentStoreOptions and change state…
user1809511
  • 51
  • 1
  • 3
0
votes
1 answer

Message sent to deallocated instance VERY WEIRD ERROR

I'm using Xcode 5.02 and iOS 7.04 and I've been searching long and hard to solve this annoying bug, and after many hours of debugging, I still cannot squash this bug. So I'm using a UIManagedDocument Helper class in order to retrieve my data +…
0
votes
1 answer

iOS App Depends on CoreData and open documents

My app depends on the UIManagedDocuments being open. Therefore I basically don't want the user to do anything unless the documents are open. The problem is that opening closed documents is asynchronous. What is the best way to go about this to make…
user1529956
  • 735
  • 2
  • 10
  • 24
0
votes
1 answer

how to move UIManagedDocument to iCloud

What is the code to move UIManagedDocument which has some data from local to iCloud directory? I understand i need to use migratePersistentStore feature, but when i don't understand how should i do that with a managed document, and there is no…
t0a0
  • 668
  • 1
  • 9
  • 18
0
votes
2 answers

What to do when the user enables or disables the iCloud support in the app Settings Bundle?

I am targeting iOS7 and I use iCloud with an UIManagedDocument. I would like to know what to do in these two cases: 1) First case: App first launch It's the first launch, when we do not know yet if the user wants to use iCloud or not and we should…
nico9T
  • 2,496
  • 2
  • 26
  • 44
0
votes
1 answer

Setting item ubiquitous strange behaviour

The thing is, i have a UIManagedDocument in some local directory. Im setting it ubiquitous. Here is the code : -(void)queryGatheredInfo:(NSNotification*)notification{ NSLog(@"Query gathered info!"); [[NSNotificationCenter…
t0a0
  • 668
  • 1
  • 9
  • 18
0
votes
0 answers

iCloud Core Data during the first run

I have an app, which creates a managed document on start, and imports some default data. then user can add his own data. all data handled by a single document. Now i want to add icloud support. and im wondering what should i do, if there is a…
t0a0
  • 668
  • 1
  • 9
  • 18
0
votes
3 answers

UIManagedDocument and iCloud: "The provided ubiquity name is already in use."

I am writing an app targeting iOS7. My testing devices are: 1) an iPhone 5 16GB 2) an iPad 3rd generation 16GB Wi-fi+Cellular. I am getting mad with UIManagedDocument and iCloud. I read all the documentation I found, I watched the Stanford CS193P…
nico9T
  • 2,496
  • 2
  • 26
  • 44
0
votes
1 answer

Moving a core data model that allows external storage into a UIManagedDocument

What is the right way to move a core data model that allows external storage into a UIManagedDocument? I have a core data store that I am trying to move into a UIManagedDocument. I have users with lots of data. Some of it is 2 - 3 minute audio…
0
votes
0 answers

iCloud UIManagedDocument EXC_BAD_ACCESS error after deleting app and reloading

I have an app that I'm making and it uses a UIManagedDocument to handle core data and iCloud. At the start of my app I Open the file and initialize the UIManagedDocument with the iCloud directory. This works fine the first time I load the program…
Matt Zera
  • 465
  • 3
  • 12
0
votes
0 answers

Create UIManagedDocument or equivalent on Mac OS / Cocoa

I would like to create the equivalent of UIManagedDocument on Mac OS X (Cocoa) and use this file on iOS. How can this be done? Can we expect to get a UIManagedDocument class or equivalent on Mac OS X soon?
AlexR
  • 5,514
  • 9
  • 75
  • 130
0
votes
0 answers

AVFoundation and other frameworks causing "exception" with Core Data app

When I add various frameworks, pictured below (the ones marked in red), my app throws an exception at save. When the app is restarted all data is lost. I am creating a document based cored data app. All seems ok until I add some frameworks needed…
OWolf
  • 5,012
  • 15
  • 58
  • 93
0
votes
1 answer

NSFetchRequest fetches zero matches of entity from database created using UIManagedDocument

I am using Justin Driscoll's article on Core Data with UIManagedDocument in singleton pattern to set it up for UITabViewController. I am running the app on Simulator. Its working fine for the first time. The database is created successfully and I…
Vidya Bansal
  • 231
  • 4
  • 12
0
votes
2 answers

UIManagedDocument used in UITabViewController crashes when trying open an existing database

I am using Justin Driscoll's article on Core Data with UIManagedDocument in singleton pattern to set it up for UITabViewController. I am running the app on Simulator. Its working fine for the first time. The database is created successfully and I…
Vidya Bansal
  • 231
  • 4
  • 12
0
votes
2 answers

CoreDataTableView Not Updating When Saving From Child ManagedObjectContext and Parent ManagedObjectContext

I'm trying to populate CoreData from a JSON file with thousands of entries. What I'm trying to do is create a new NSManagedObjectContext with the parent property set to my main NSManagedObjectContext. Every so often I save on my child context and if…