13 Feb 2013, 15:11
Generic-user-small

Tad Anderson (2 posts)

I do not think I have ever purchased a book with such broken code samples. Is no one else having this problem? I must be doing something wrong.

Everything from the weird “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)” to the ‘CoreFoundation/CoreFoundation.h’ file not found and the 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).

I don’t have a very warm and fuzzy feeling about following the advice in a book that can’t provide working samples.

Please fix your sample code and make it available for download.

Thank you….

13 Feb 2013, 18:26
Avatarsmall_pragsmall

Marcus S. Zarra (245 posts)

When did you download the sample code? There was an error in the samples that was corrected and pushed up to the website a week ago.

Please grab a fresh copy and let me know which projects you continue to have issues with.

13 Feb 2013, 21:50
Generic-user-small

Tad Anderson (2 posts)

I downloaded the code yesterday from: http://pragprog.com/titles/mzcd2/source_code

Every project is an issue. That is not an exaggeration. What version of Xcode/sdk are you running? Have you tried pulling the samples down onto a box they were not built on? I am running Xcode 4.6. Is there some setting we need to change to run under an older library?

The .nib files do not open at all.

The RecipesV1, 2, 3 have the error / alert that does not make any sense “The recipes database is either corrupt or was created by a newer version of Grokking Recipes” and The model used to open the store is incompatible with the one used to create the store. You can comment out the alert, but why should we have to?

I got the ‘CoreFoundation/CoreFoundation.h’ file not found fix by downloading the Commend Line Tools and got one of them to run by using the refactor > convert to modern object-c syntax.

15 Feb 2013, 17:32
Avatarsmall_pragsmall

Marcus S. Zarra (245 posts)

Tad,

There were a few issues in the processing of the code samples for upload to the website. Those have been corrected and a new version of the code is now available for download.

Please let me know if you run into any further issues and thank you for bringing this issue to my attention.

26 Feb 2013, 22:16
Generic-user-small

Benjamin Zeiss (1 post)

Hm, I just tried the RecipesV1 example in the Xcode 6.1 iPhone simulator and it also crashed right on startup. I didn’t have yet the time to track this down though.

08 May 2013, 18:02
Generic-user-small

Kevin M (2 posts)

I am also having issues with the sample projects. For recipes V1, the app crashed when adding an ingredient - KVC error bc there was no “ingredient” attribute. I added one to the model and it seems ok for now…

recipe V3: 4 errors -NSXMLStoreType unavailable (this error has been “explicitly marked unavailable” according to Xcode)

redefinition of error looks like the other two are memory issues - error about ‘release’ and ARC restrictions.

Can you please help me resolve the errors or do you have updated zip?

Thanks!

Kevin

10 Aug 2013, 01:21
Generic-user-small

Michael J Albanese (1 post)

I regret to add I’ve just been wasting a few hours attempting to track down a very similar issue while trying to run Recipes V1, which crashes with:

2013-08-09 18:03:37.430 PPRecipes[22494:c07] *** Terminating app due to uncaught exception ‘NSUnknownKeyException’, reason: ‘[<PPRDetailViewController 0x8164f10> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key detailDescriptionLabel.’

While this is very disappointing, I can (somewhat) commiserate with the task any author has to publish code out to a world where sdk’s and developer tools change faster than usain bolt. I was really looking forward to tracing through the core data call stack (e.g. a working version that is).

I bought the book this week August 7th, downloaded the code August 8th, both date are well beyond any suggestions in this thread that a ‘fix was just posted’…

I still hold the text of the book in high regard and think it is much better than any I’ve read.

Too bad though.

I will state that the example did run 1 time, at which point I added a single new recipe. All ensuing executions throw the above mentioned exception.

I tried the usual, remove from the simulator. Even went as far as removing the .sqlite file from the simulator’s /Documents directory. But alas, this is feeling to dang much like debugging, which I already do far too much of already !

Would be nice if these examples worked, you put a lot of work into them (all of them). They look to cover so much ground.

Michael

xCode 4.6.3 running on Mountain Lion

22 Nov 2013, 15:11
Generic-user-small

Stephen Kavanagh (1 post)

I just downloaded the sample code from this site and I can’t get it to run either. I assume it is no longer being supported. Too bad, I was hoping to use the debugger to step through the examples to get a better understanding of their implementation.

That said, the speed with which iOS and Xcode are changing make just about any book out of date within months of being published. Too bad e-pub isn’t used on a “subscription” basis. It would provide a financial incentive for the author(s) to keep their text up to date.

  You must be logged in to comment