small medium large xlarge

Generic-user-small
28 Mar 2016, 14:45
Partha (2 posts)

Would it be possible to attach the chapter number to the folder available in the zipped source file. I started with PRRecipes folder. However when I try to run the app it is crashing. I am not sure whether this is the project that I am supposed to start with. One of the exception being :

*** Terminating app due to uncaught exception ‘NSUnknownKeyException’, reason: ‘[<PPRecipes.PPRRecipeMO 0x13ce81600> valueForUndefinedKey:]: the entity Recipe is not key value coding-compliant for the key “lastUsed”.’

Any help is highly appreciated.

This might be addressed when the final version of the book is available.

Avatarsmall_pragsmall
28 Mar 2016, 16:25
Marcus S. Zarra (274 posts)

Thank you for pointing out an issue with running the sample code with the book. I will check into it and make sure it is corrected before the final publication.

Likewise, the code samples are shared across the chapters and the best way to see what code is associated with which chapter is to look at the “path” at the top of the code in the book. That will let you know which subproject is associated with that sample.

Thank you again for your input!

Generic-user-small
28 Mar 2016, 22:57
Partha (2 posts)

Thanks for the quick response. As the entities are not defined fully and the code expects that info to be available the app crashes. I will update the entities as I move along so that I can follow your book.

Generic-user-small
11 Aug 2016, 18:46
Salvatore Vivolo (2 posts)

Hi, I just bought the Swift Core Data book, and I’m trying to follow along with the code from the site, but there are several issues. - With Swift 2.0 the code compiles but at runtime some exceptions are thrown - With Swift 2.3 and Swift 3.0 there are several compiling errors At the moment it is quite difficult to move ahead since I need to track down all of these issues, so I was wondering if there is any plan to port the code of the example application to Swift 3.0?

Many thanks,

Salva

Avatarsmall_pragsmall
11 Aug 2016, 18:48
Marcus S. Zarra (274 posts)

Salvatore,

There is a plan to update the code to Swift 3 after it stabilizes.

Right now the language itself is still in flux from one beta to the next.

Generic-user-small
12 Aug 2016, 14:38
Salvatore Vivolo (2 posts)

Thank you for the fast answer Markus.

Could you please suggest me which Swift version to use to follow the examples from the book and to use the code you provided?

When I tried to use Swift 2.0 it compiled, but at runtime an exception was thrown… Any idea about the issue? (I’ll provide more info about the issue as soon as I can since right now I have no access to my iMac).

Thanks, Salva

Avatarsmall_pragsmall
12 Aug 2016, 22:26
Marcus S. Zarra (274 posts)

Salvatore,

The code was developed with Swift 2 and if you are having an issue in that environment (Xcode 7) please let me know by posting the issue in this thread.

Thanks!

Generic-user-small
17 Aug 2016, 12:33
Adam (2 posts)

Am I missing something? None of the provided samples simply run and work. I’m using Xcode 7 and the default Swift version (2) and while most of the applications start up, none of them actually persist data. I’m also seeing crashes for things like ‘fatal error: Unidentified segue:’ because there’s a guard on segue identifiers, but no identifier was created. It seems like I’m either expected to fix/add stuff in these projects, or there is potentially a git repository somewhere, with more up to date code? Also seeing issues where navigating to a recipe causes you to get stuck, with no way to navigate back to the main list of recipes. Being that these apps are less than usable, it feels like I’m missing something.

Avatarsmall_pragsmall
18 Aug 2016, 16:46
Marcus S. Zarra (274 posts)

Adam,

When we did the last update to the book all of the code was working. I will check with the team and make sure the latest code samples are accessible.

Generic-user-small
18 Aug 2016, 20:41
Adam (2 posts)

Thanks for the response, looking forward to hearing if there are updated samples!

Dsc00765_pragsmall
29 Aug 2016, 14:04
Susannah Davidson Pfalzer (104 posts)

Hi Adam,

Sorry to hear about the issues you are having. The code on our site is the latest version of the code.

Best, Susannah

Generic-user-small
14 Sep 2016, 17:56
Robert Schwalbe (1 post)

Has there been any progress in getting all the sample code ported to Swift 3.0? Even unofficial bootleg copies would serve me better than trying to convert everything by myself.

Avatarsmall_pragsmall
14 Sep 2016, 17:59
Marcus S. Zarra (274 posts)

Xcode was literally updated to a public release yesterday :)

Now that Swift 3 has “stabilized” the update can be looked at.

I do not have an ETA yet but will update the thread as soon as I have more information.

Generic-user-small
06 Nov 2016, 05:26
jackson (2 posts)

hi have the codes been updated to the swift 3? i encountered error in the DataController file which i believe is due to the version of swift used in the code:

fileprivate func populateTypeEntities() { …. let count = pMOC.count(for: fetch, error: &error) //extra argument “error” in call. ….. }

Thank you.

Avatarsmall_pragsmall
07 Nov 2016, 15:55
Marcus S. Zarra (274 posts)

Jackson,

The code is being updated to Swift 3 now that it is “final”. However I had an injury recently (broken clavicle :) that has slowed me down. I am actively working on the update and Prag will notify everyone when the update is available.

I apologize for the delay :)

Generic-user-small
08 Nov 2016, 02:54
jackson (2 posts)

Hi Marcus,

Thanks for the information. Looking forward to the latest code!

Generic-user-small
05 Jan 2017, 16:02
Mitch Cohen (1 post)

I just wanted to post a Thank You for the Swift 3 update! Good stuff.

You must be logged in to comment