Questions tagged [nspersistentdocument]

NSPersistentDocument is a subclass of NSDocument intended to work with Core Data.

NSPersistentDocument is part of Apples Framework.

It is a subclass of that is intended to work with . It provides access to a document-wide object.

71 questions
46
votes
4 answers

Lightweight migration of a NSPersistentDocument

I'm trying to do a lightweight migration of a SQLite store in Core Data. Working on Lion 10.7.3 with Xcode 4.3.1. In my NSPersistentDocument subclass (AccountDocument), I've overridden the method used to configure the persistent store coordinator so…
chockenberry
  • 7,811
  • 5
  • 32
  • 41
7
votes
3 answers

NSDocument: The document could not be autosaved. The file has been changed by another application

A search on the title of this post reveals that it's pretty common; indeed, I've gotten this error from Xcode. But I can't seem to find any fixes. I'm seeing it now when I run my program, and it appears to occur during or after…
pickwick
  • 3,134
  • 22
  • 30
6
votes
3 answers

Mac / iPhone app - syncing core data to iCloud & devices (using core data)

I am working an iPhone app and a Mac app that use Core Data. I would like to have these 2 apps synchronise their databases via iCloud storage. I have made adjustments to the implementations of the managedObjectContext & persistentStoreCoordinator &…
adamteale
  • 940
  • 2
  • 12
  • 27
6
votes
1 answer

NSManagedObjectContextObjectsDidChangeNotification not always called instantly

I have an Mac Application using a NSPersistentDocument. I want to get notified when Objects are deleted to save this information using Core Data. So I'm listening for NSManagedObjectContextObjectsDidChangeNotification. Often it is called instantly…
6
votes
2 answers

Using NSPersistentDocument to create 'Documents'

I would like to create an app that uses Swift CoreData 'Documents' which work in the standard macOS fashion [custom extension, a single 'file'/filewrapper containing all data relating to that document] This does not appear possible. The…
green_knight
  • 1,319
  • 14
  • 26
5
votes
2 answers

NSPersistentDocument "Unsupported store type" Exception

I've run into this problem twice now: Xcode 4.1, Lion, and a NSPersistentDocument Core Data project. My program was running fine until I added two "binary data" attributes to one of the entities in my model. Now, when I run the app and try to save…
4
votes
1 answer

What happend with external records in NSPersistentDocument documents?

I just thought about to use a NSPersistentDocument and in my data model i like to store some binary data. Well since 10.7 Core Data provide external storage feature. Does somebody know or even have tests (maybe some samples) what happen when you…
Stephan
  • 4,263
  • 2
  • 24
  • 33
3
votes
0 answers

NSDocument refuses to update core data changes using NSFetchedResultsController

I have a Document Based Core Data Application. Each NSPersistantDocument has its own Managed Object Context. I can open/create a document and create a Managed Object within fine, but after open/creating a document and then initialising and inserting…
3
votes
2 answers

Change default NSManagedObjectContext of NSPersistentDocument

Core data newbie here. I'm trying to change the default NSManagedObjectContext of an NSPersistentDocument, in order to initialise and use it with NSMainQueueConcurrencyType. Currently I'm doing it in -windowControllerDidLoadNib: like this: -…
insys
  • 1,288
  • 13
  • 26
3
votes
2 answers

Unknown class '_FITagEditorView' error : is this normal?

I am using the NSPersistentDocument class. When opening a document, I have the following error. Unknown class '_FITagEditorView', using 'NSView' instead. Encountered in Interface Builder file at path…
Colas
  • 3,473
  • 4
  • 29
  • 68
3
votes
2 answers

Are NSPersistentDocument and UIManagedDocument compatible?

I would like to create a NSPersistentDocument in Mac OS X and read this document as a UIManagedDocument on iOS 7. Is this possible? Are both file formats compatible? Thank you!
AlexR
  • 5,514
  • 9
  • 75
  • 130
3
votes
0 answers

Is there a newer version of NSPersistentDocument Core Data Tutorial for Mac OS X v10.4?

I found a tutorial about NSPersistentDocument, which was out-dated. The document is titled NSPersistentDocument Core Data Tutorial for Mac OS X v10.4. Is there any other newer version of the document? Or, is there alternative to this kind of…
Sangcheol Choi
  • 841
  • 1
  • 12
  • 19
3
votes
1 answer

How to force creation of default persistentStore/autosave in NSPersistentDocument

I have a document-based Cocoa app using CoreData which can import large amounts of data. Since this import takes some time I do it in the background, but since NSManagedObjectContext is not thread save I used the persistentStoreCoordinator of the…
Joachim Kurz
  • 2,875
  • 6
  • 23
  • 43
3
votes
1 answer

Is it bad to use NSPersistentDocument with an alternate save format?

I'm thinking of making a Core Data-based document-centric application, but I want the saved file format to be my own proprietary bundle of XML, images and other stuff. My plan is to use a subclass of NSPersistentDocument that serializes back and…
Khakionion
  • 742
  • 7
  • 20
2
votes
2 answers

SQLite-based NSPersistentDocument in a sandboxed environment

I'm attempting to bring a Mac app up-to-date with the new sandboxing rules in Lion. However, despite requesting com.apple.security.files.user-selected.read-write permissions, I'm getting errors. When I look in the logs, I see deny file-write-create…
Thom
  • 2,643
  • 2
  • 30
  • 33
1
2 3 4 5