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

Core Data and iOS 7: Different behavior of persistent store

I'm preparing an update for a Core Data based app for fixes with iOS 7. I use Xcode 5 and iOS 7 SDK GM. However I realized a different behavior of the persistent store (which is a UIManagedDocument): Prior to iOS 7 builds there was only one file…
FrankZp
  • 2,022
  • 3
  • 28
  • 41
11
votes
5 answers

UIDocument openWithCompletionHandler not completing on iOS device

I am trying to open a managed document using openWithCompletionHandler: The problem I am coming across is that it works fine on the simulator, but when I test it on my iPhone 4 the completion handler never finishes. The code looks like…
10
votes
1 answer

Xcode 8 GM -- SQLite error code:6922, 'disk I/O error'

I am in the process of re-releasing my iPhone app and now an executeFetchRequest on my UIManagedDocument gets an SQLite error code:6922. I have searched the internet and there is no SQLite error code 6922. Anyone seen this. Everything worked fine…
Scott Sarnikowski
  • 1,461
  • 2
  • 14
  • 24
9
votes
1 answer

Uima Ruta Out of Memory issue in spark context

I'm running an UIMA application on apache spark. There are million of pages coming into batches to be processed by UIMA RUTA for calculation. But some time i'm facing out of memory exception.It throws exception sometime as it successfully process…
Gaurav
  • 139
  • 1
  • 16
9
votes
3 answers

Bug in iPhone Simulator 5.1 with Xcode 4.5 using UIManagedDocument

I have a very weird problem I've spent the last two days trying to solve... I had a piece of code that was working perfectly fine on Xcode 4.4 and iOS 5.1 Simulator, using the 5.1 SDK. After I updated to Xcode 4.5 and the 6.0 SDK, my code stopped…
Breno Gazzola
  • 2,092
  • 1
  • 16
  • 36
7
votes
2 answers

Core Data managed object does not see related objects until restart Simulator

Got a Stumper (at least for me). I am using iOS 5.0 w/ ARC, and Core Data inside of UIManagedDocument. I have an Entity (Group) with a to-many relationship (called people) to entity (Person). When I add a new Group, and add then a new Person…
Byron
  • 399
  • 2
  • 12
7
votes
2 answers

UIManagedDocument example / tutorial

I have been trying very unsuccessfully to create a simple UIManagedDocument library style application (separate documents saved to iCloud). I am confused with the following: Do I subclass UIManagedDocument and set up the persistentStoreCoordinator,…
adamteale
  • 940
  • 2
  • 12
  • 27
7
votes
3 answers

UIManagedDocument not saving

I'm using UIManagedDocument to manage my data. I create the model and use it, and everything seems to be working, but my changes aren't being written back to the SQLite store. The documentation for UIManagedDocument says that the autosave should…
stevex
  • 5,589
  • 37
  • 52
7
votes
1 answer

FileDocument with UIManagedDocument/core data

When using SwiftUI to create a document based app, the default document type is to subclass FileDocument. All examples lead to simple value types to be used in this document type. I'm looking to create a UIManagedDocument in SwiftUI but there…
Adam Carter
  • 4,741
  • 5
  • 42
  • 103
7
votes
0 answers

UIManagedDocument saveToURL completionHandler is not called - Error message: "The reader is not permitted to access the URL."

I've got an old app that uses UIManagedDocument to interact with Core Data. However on iOS 11.2 (and possibly earlier iOS 11 point releases) the saveToURL:forSaveOperation:completionHandler: method seems to have stopped working both on-device and in…
Nick
  • 3,172
  • 3
  • 37
  • 49
6
votes
3 answers

Migration issues with UIManagedDocument

I started using CoreData in my application following Stanford CS193P lessons regarding the use of iOS 5's new class UIManagedDocument. The approach itself is quite straightforward but I can't understand how to deal with model modifications i keep…
micamoita
  • 450
  • 2
  • 14
6
votes
1 answer

What should I do after receiving an NSUbiquityIdentityDidChangeNotification?

Apple documentation says we need to register for NSUbiquityIdentityDidChangeNotification and to compare the current iCloud token with the one previously stored in NSUserDefaults to detect if a user disabled iCloud from Documents & Data Settings or…
nico9T
  • 2,496
  • 2
  • 26
  • 44
6
votes
1 answer

iOS 7: What happened to UIDocument / UIManagedDocument and iCloud?

I was taking a look at WWDC 2013 sessions concerning iCloud and Core Data. I was really hoping to see there any new videos for UIManagedDocument or UIDocument. You might remember that those classes theoretically offer a great and simple approach to…
FrankZp
  • 2,022
  • 3
  • 28
  • 41
6
votes
3 answers

UIManagedDocument Singleton Code openWithCompletionHandler called twice and crashes

I am using Justin Driscoll's implementaion on Core Data with a Single Shared UIManagedDocument. Everything was fine in my iphone app until I moved it to a iPad storyboard and a splitview controller for the ipad app. The problem is…
5
votes
2 answers

UIManagedDocument + iCloud "Big Picture"?

I am working on my first "iCloud App". I worked through the Apple docs and the Stanford videos but I am still struggling to understand the "Big picture" of iCloud. My goal is to create a "Library style" app (which is Apples term for an app with "a…
Andrei Herford
  • 17,570
  • 19
  • 91
  • 225
1
2 3
12 13