small medium large xlarge

25 Oct 2012, 17:55
Frederick C. Lee (20 posts)

My Environment: OSX 10.8.2/Xcode v4.5.1 Running your sample Baseline/PPRRecipes.

Ref: Book’s “A Simple Migration”… attempting to follow by trying to open the .xcdatamodeld:

I got the following Error Alert: “The operation couldn’t be completed. Error, failed to read Core Data Model from /Users/Ric/Desktop/Baseline/PPRecipes/PPRecipes.xcdatamodeld/v3.xcdatamodel”

…which doesn’t explain much.

06 Nov 2012, 19:15
Marcus S. Zarra (254 posts)

Sounds like your download was corrupted. Can you download the source again and see if you can open the file from the new download?

17 Nov 2012, 19:51
Mel Torme (5 posts)

Mac OS X 10.8.2, Xcode 4.5.2

I tried downloading the source code on 11/6/12 and again on 11/9/12 (eBook B2 version). None of the downloaded projects in the .zip or .tgz archives will allow viewing of the .xcdatamodeld file. Consequently, the projects won’t compile. When I attempt to view the .xcdatamodeld file in xCode, it reports “The operation couldn’t be completed. Error, failed to read Core Data Model from /Users/username/path/to/code/RecipesV1/PPRecipes/PPRecipes.xcdatamodeld/v1.xcdatamodel”

Additionally, one warning common to all of the projects is that xCode complains about the lack of a “Default-nnnh@2x.png” file. Xcode kindly offers to fix that warning with ease.

Lastly, in RecipesV1/PPRecipes/PPRMasterViewController.m there’s a method called “fetchedResultsController2” which I’m guessing is unnecessary, but it throws two warnings at the lines reading:

<[sortArray addObject:[[NSSortDescriptor alloc] initWithKey:@”type” ascending:YES]];> <[sortArray addObject:[[NSSortDescriptor alloc] initWithKey:@”name” ascending:YES]];>

Changing “NSArray *sortArray = [NSMutableArray array];” to “NSMutableArray *sortArray = [NSMutableArray array];” seems to remedy these two errors.

Is anybody able to get the projects to compile or able to view the .xcdatamodeld files?

Erik by kmp-256_pragsmall
10 Nov 2012, 16:41
Erik Hansen (6 posts)

Same problem as Mel here, with the same setup. Neither the .tar nor .zip will give me .xcdatamodeld files that’ll open.

11 Nov 2012, 00:56
Luke Krasnoff (5 posts)

I’m having the same problem as Mel also (Mac OS X 10.8.2, Xcode 4.5.2, mzdc2-code).

11 Nov 2012, 01:09
David Cross (1 post)

I have the identical problem and cannot open any of the .xcdatmodeld files. Also on 10.8.2 and Xcode 4.5.2

12 Nov 2012, 16:08
Tom Castonzo (1 post)

Same issue.

.xcdatmodeld 2012-11-12 11:05:07.216 momc[56884:70b] * Terminating app due to uncaught exception ‘NSInvalidArgumentException’, reason: ‘* -[NSKeyedUnarchiver initForReadingWithData:]: incomprehensible archive

13 Nov 2012, 20:15
Eric Turner (6 posts)

Same issue as before. OS X 10.8.2 / Xcode 4.5.2 (4G2008a).

DataModelVersionCompile /Users/eric/Library/Developer/Xcode/DerivedData/PPRecipes-dnuacinnoqplruhapmomrbmjioly/Build/Products/Debug-iphonesimulator/ PPRecipes/PPRecipes.xcdatamodeld cd /Users/eric/Programming/ExampleCode/MarcusZarra/CoreData-2_code-1/Baseline setenv PATH “/Applications/” /Applications/ -XD_MOMC_SDKROOT=/Applications/ -XD_MOMC_IOS_TARGET_VERSION=6.0 -MOMC_PLATFORMS iphonesimulator -MOMC_PLATFORMS iphoneos -XD_MOMC_TARGET_VERSION=10.6 /Users/eric/Programming/ExampleCode/MarcusZarra/CoreData-2_code-1/Baseline/PPRecipes/PPRecipes.xcdatamodeld /Users/eric/Library/Developer/Xcode/DerivedData/PPRecipes-dnuacinnoqplruhapmomrbmjioly/Build/Products/Debug-iphonesimulator/

2012-11-13 12:08:56.574 momc[3345:f07] * Terminating app due to uncaught exception ‘NSInvalidArgumentException’, reason: ‘* -[NSKeyedUnarchiver initForReadingWithData:]: incomprehensible archive (0x62, 0x70, 0x6c, 0x69, 0x73, 0x74, 0x30, 0x30)’*** First throw call stack:( 0 CoreFoundation 0x00007fff8514f0a6 __exceptionPreprocess + 198 1 libobjc.A.dylib 0x00007fff8e8983f0 objc_exception_throw + 43 2 CoreFoundation 0x00007fff8514ee7c +[NSException raise:format:] + 204 3 Foundation 0x00007fff8df9cb99 -[NSKeyedUnarchiver initForReadingWithData:] + 3097 4 Foundation 0x00007fff8df74c20 +[NSKeyedUnarchiver unarchiveObjectWithFile:] + 124 5 momc 0x00000001014fba49 momc + 6729 6 momc 0x00000001014fc27f momc + 8831 7 momc 0x00000001014fcc54 momc + 11348 8 momc 0x00000001014fb1b8 momc + 4536)libc++abi.dylib: terminate called throwing an exceptionCommand /Applications/ failed with exit code 6

14 Nov 2012, 09:49
Paul (1 post)

The operation couldn’t be completed. Error, failed to read Core Data Model from /Users/paul/Downloads/code/RecipesV3/PPRecipes/PPRecipes.xcdatamodeld/v3.xcdatamodel

On 2 macs downloaded, one from the zip and other from the tar

OSX 10.8 xcode 4.5.2

14 Nov 2012, 18:58
Colleen Toporek (2 posts)

Thanks everyone for these error reports; sorry about the trouble. We think it’s a problem with the download itself and we’re looking into it. More soon.

15 Nov 2012, 09:23
王要正 (3 posts)

I got the same issue.

And I got this error when I click PPRecipes.xcdatamodeld file: “The operation couldn’t be completed. Error, failed to read Core Data Model from /Users/azone/Downloads/code/RecipesV3/PPRecipes/PPRecipes.xcdatamodeld/v3.xcdatamodel”

18 Nov 2012, 03:08
chad eubanks (3 posts)

Any movement on this issue? Really excited to run through the book. But with the foundation application not working. We are blocked.

19 Nov 2012, 18:24
Marcus S. Zarra (254 posts)

I was finally able to see this issue and it is a problem with the download files.

Fortunately, I was able to switch all of the data model files over to the new xml format which eliminates the issue.

Should be working in the next beta push.

Erik by kmp-256_pragsmall
20 Nov 2012, 16:44
Erik Hansen (6 posts)

The new version seems to work perfectly. Thanks!


23 Nov 2012, 22:25
Mel Torme (5 posts)

Mac OS X 10.8.2, Xcode 4.5.2, ebook & code B3

I concur! The . xcdatamodeld file is now viewable!

However, the projects (RecipesV1 - RecipesV3) aren’t able to compile, or, if they do compile, crash with an error reading: 1) “Terminating app due to uncaught exception ‘NSUnknownKeyException’, reason: ‘[<PPRDetailViewController 0x828aea0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key detailDescriptionLabel.’”

2) “Terminating app due to uncaught exception ‘NSInvalidArgumentException’, reason: ‘*** -[NSKeyedUnarchiver initForReadingWithData:]: incomprehensible archive”

or an alert screen reading:

3) “Error: The recipes database is either corrupt or was created by a newer version of Grokking Recipes. Please contact support to assist with this error. (null) (null)”

I’ve attempted to clean the project and checking some of the other parameters, but I can’t seem to get it work right. Is anybody else having this issue?

25 Nov 2012, 07:09
Eric Turner (6 posts)

@Mel: see my post at I had same problem and fixed the crash, but encountered further difficulties. I’m having a hard time understanding the different versions of the example app relating to the book.

03 Dec 2012, 19:17
Mel Torme (5 posts)

Eric - thank you for the pointer!

I’m still having more issues getting the various projects to compile and/or not crash though.

1) RecipesV1 throws an exception reading “[PPRAppDelegate initializeCoreDataStack]_block_invoke_0(0x864d360) Error adding persistent store to coordinator The operation couldn’t be completed. (Cocoa error 134100.)”. After resetting everything and re-downloading the code, it crashed and reported “CoreData: error: Serious application error. Exception was caught during Core Data change processing. This is usually a bug within an observer of NSManagedObjectContextObjectsDidChangeNotification. *** -[__NSPlaceholderArray initWithObjects:count:]: attempt to insert nil object from objects[0] with userInfo (null)”

2) The nib files included with DepartmentAndEmployees aren’t able to be viewed. Xcode states “The document “MyDocument.nib” could not be opened. The operation couldn’t be completed. *** -[NSKeyedUnarchiver initForReadingWithData:]: incomprehensible archive (0x62, 0x70, 0x6c, 0x69, 0x73, 0x74, 0x30, 0x30).”. Consequently, the project won’t compile.

3) With the tip passed along by Eric, I commented out [alertView] in the initializeCoreDataStack method and the app ran! However, it crashed stating “** Assertion failure in -PPRMasterViewController prepareForSegue:sender:, /Users/user/Documents/Programming/Marcus Zarra - Cora Data 2/code/Baseline/PPRecipes/PPRMasterViewController.m:98 PPRecipes[27251:c07] ** Terminating app due to uncaught exception ‘NSInternalInconsistencyException’, reason: ‘Unknown segue: showRecipe’”

4) The “Shared” Desktop.xcodeproj project crashes too after I set a new entry to Dessert stating “Unacceptable type of value for attribute: property = “type”; desired type = NSString; given type = NSManagedObject; value = <NSManagedObject: 0x10301d060> (entity: Type; id: 0x10301df40 <x-coredata://61249A9E-46B8-4F27-BAD6-0863F9D6EE3F/Type/p6> ; data: {name = Dessert;}).”

I’ve been working through the code and I’m trying to figure out the various fixes.

  You must be logged in to comment