Core Data & UIManagedDocument in Xcode 4.3: Unable to merge models

I want to thank all the people who contribute to this site. I am in programming and you all help me like that. With that said, let's continue with my last problem!

I am creating an application that uses UIManagedDocumentCore Data models to store for me. I use to create UIManagedDocumentwith the following code, but now with Xcode 4.3.2 (the one that is being updated from the Mac App Store) I have a problem.

Here is the code:

    NSURL *url = [[[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask] lastObject];
    url = [url URLByAppendingPathComponent:@"MyFile"];

    NSLog(@"\n\n This line does print. \n\n");
    UIManagedDocument *document = [[UIManagedDocument alloc] initWithFileURL:url];
    NSLog(@"\n\n This line does not print \n\n");

An error message appears in the console:

Application termination due to an uncaught exception "NSInvalidArgumentException", reason: "Unable to combine models with two different objects named" Foo "

, - . UIManagedDocument : , ?

Xcode . .

2 , .

! ! . , . ...

+3
1

, .

, UIManagedDocument. . , .

, .

- iphone

+1

All Articles