UIManagedDocument


#1

In the Stanford lectures, UIManagedDocument is used to manage the CoreData objects. Just wondering why the BNR book doesn’t use this method? What are the benefits and/or drawbacks?


#2

In the BNR book we used a persistentStoreCoordinator along with the other objects to manage the database. To save the data we had to call save. The Stanford lectures seem to indicate if we use a UIManagedDocument then the saves happen automatically? Is this the case? If so there must be a drawback, I would think, to using the UIManagedDocument.


#3

After looking more closely at the code it doesn’t appear that we call the save method after all. I tried the Stanford approach and couldn’t get the document to save. So I went back to the BNR way and it worked without any problems.


#4

If I remember correctly, a message is sent to the save method from within the AppDelegate - when the application moves to the background.

Nick
http://myfirstiphoneapp.co.uk


#5

Your right, fujilla. Saw that later and forgot to update my post. Thanks though.

Jeff