I'm having a hard time debugging a problem with my data (CoreData, NSPersistentDocument).
I have a subclass of NSPersistentDocument. I am using NSManagedObject subclasses / standard Core Data models. I'm not doing anything special in NSPersistentDocument or with the NSManagedObject classes. I am merely creating an object (in NSPersistentDocument's subclass):
[NSEntityDescription insertNewObjectForEntityForName:@"ModelName"
inManagedObjectContext:[self managedObjectContext]];
When I attempt to save the document in my app, there is a drop-down for file formats. It includes Binary (default), SQLite, and XML. I save the file as XML. When I try to view it (using less, or even opening in Finder), I find that the file is stored as binary.
Is there something special I need to go to force it to XML?
My understanding based on the documentation from Apple is that in using an NSPersistentDocument subclass, I don't need to do the work of setting up the NSPersistentStore or NSPersistentStoreCoordinator. My understanding is all of this comes for free. Also from what I've read, XML is the default.