# Core Data by Tutorials

**URL:** https://forums.kodeco.com/c/books/core-data-by-tutorials/12.md?page=2

[Latest](https://forums.kodeco.com/latest.md) · [Categories](https://forums.kodeco.com/categories.md) · [Tags](https://forums.kodeco.com/tags.md)

**Page:** 3

---

## [Chapter 4 - Starter App Crash](https://forums.kodeco.com/t/chapter-4-starter-app-crash/90309)

<div class="topic-metadata">

**Author:** [@vkvkcy](https://forums.kodeco.com/u/vkvkcy)\
**Replies:** 2\
**Last updated:** [January 13, 2020, 4:37am UTC](https://forums.kodeco.com/t/chapter-4-starter-app-crash/90309 "2020-01-13T04:37:55Z")

</div>

When I tired to build and run the Chapter 4 starter app, it crashed. But the Final version was ok. I redownloaded the app but the problem still exist. Anyone can comment? (Am using Xcode ver 11) Thanks. Hopes it helps -…

---

## [Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-\[UnCloudNotes.Attachment copyWithZone:\]: unrecognized selector sent to instance 0x60000280fac0'](https://forums.kodeco.com/t/terminating-app-due-to-uncaught-exception-nsinvalidargumentexception-reason-uncloudnotes-attachment-copywithzone-unrecognized-selector-sent-to-instance-0x60000280fac0/88654)

<div class="topic-metadata">

**Author:** [@alexyz](https://forums.kodeco.com/u/alexyz)\
**Replies:** 2\
**Last updated:** [January 11, 2020, 9:37pm UTC](https://forums.kodeco.com/t/terminating-app-due-to-uncaught-exception-nsinvalidargumentexception-reason-uncloudnotes-attachment-copywithzone-unrecognized-selector-sent-to-instance-0x60000280fac0/88654 "2020-01-11T21:37:50Z")

</div>

Hi. I am trying to build the UnCloudNotes app after making the changes in v2 to v3 in chapter 6. I am getting the following traceback: 2019-11-19 19:10:07.317193-0800 UnCloudNotes\[6010:557927\] -\[UnCloudNotes.Attachment …

---

## [Time to update the Core Data book?](https://forums.kodeco.com/t/time-to-update-the-core-data-book/79340)

<div class="topic-metadata">

**Author:** [@yoshiboarder](https://forums.kodeco.com/u/yoshiboarder)\
**Replies:** 2\
**Last updated:** [December 31, 2019, 10:02pm UTC](https://forums.kodeco.com/t/time-to-update-the-core-data-book/79340 "2019-12-31T22:02:32Z")

</div>

In WWDC 19, Introduced CoreData with CloudKit and Combine. Do you have a plan to update the book? Thanks

---

## [Core Data and CloudKit](https://forums.kodeco.com/t/core-data-and-cloudkit/25482)

<div class="topic-metadata">

**Author:** [@createch](https://forums.kodeco.com/u/createch)\
**Replies:** 10\
**Last updated:** [October 14, 2019, 4:09pm UTC](https://forums.kodeco.com/t/core-data-and-cloudkit/25482 "2019-10-14T16:09:42Z")

</div>

I would really love to see a section on Core Data \<-\> CloudKit synchronization. This is something that I think many would find extremely useful. I want to build an iOS and a MacOS app that synchronizes data across devi…

---

## [Parent Entity v Separate entity](https://forums.kodeco.com/t/parent-entity-v-separate-entity/80532)

<div class="topic-metadata">

**Author:** [@pavelar](https://forums.kodeco.com/u/pavelar)\
**Replies:** 6\
**Last updated:** [September 3, 2019, 2:16pm UTC](https://forums.kodeco.com/t/parent-entity-v-separate-entity/80532 "2019-09-03T14:16:59Z")

</div>

In Chapter 6 the example for complex mapping model the example uses a parent entity of Attachment so that the entity inherits attributes from the parent. I was giving this some thought and wanted to ask opinions on using…

---

## [Chapter 6 - Testing Sequential Migrations](https://forums.kodeco.com/t/chapter-6-testing-sequential-migrations/61124)

<div class="topic-metadata">

**Author:** [@cantyd](https://forums.kodeco.com/u/cantyd)\
**Replies:** 3\
**Last updated:** [July 10, 2019, 6:59am UTC](https://forums.kodeco.com/t/chapter-6-testing-sequential-migrations/61124 "2019-07-10T06:59:27Z")

</div>

I’m trying to test sequential migrations and the migrations appear to work, but the app is giving me a warning Multiple NSEntityDescriptions claim the NSManagedObject subclass ‘UnCloudNotes.Note’ so +entity is unable to…

---

## [Multiple Warnings when running Unit Tests in Sample app](https://forums.kodeco.com/t/multiple-warnings-when-running-unit-tests-in-sample-app/74860)

<div class="topic-metadata">

**Author:** [@gcpam](https://forums.kodeco.com/u/gcpam)\
**Replies:** 10\
**Last updated:** [July 8, 2019, 7:53am UTC](https://forums.kodeco.com/t/multiple-warnings-when-running-unit-tests-in-sample-app/74860 "2019-07-08T07:53:05Z")

</div>

Im following Chapter 7 of Core Data by Tutorials. I have run the test suite for the project in the final folder of the source code. There are multiple warnings getting logged when I run the tests: \*\* CampgroundManager\[1…

---

## [Chapter 5: NSFetchedResultsController - delete a team](https://forums.kodeco.com/t/chapter-5-nsfetchedresultscontroller-delete-a-team/62321)

<div class="topic-metadata">

**Author:** [@internetstream](https://forums.kodeco.com/u/internetstream)\
**Replies:** 2\
**Last updated:** [July 1, 2019, 5:28am UTC](https://forums.kodeco.com/t/chapter-5-nsfetchedresultscontroller-delete-a-team/62321 "2019-07-01T05:28:26Z")

</div>

Hello @pietrorea, I have extended World Cup! app for deleting team. It works but is it possible to make it more straight with NSFetchedResultsController? I have added these 2 functions in extension ViewController: UITabl…

---

## [Errata for Core Data by Tutorials v2.2](https://forums.kodeco.com/t/errata-for-core-data-by-tutorials-v2-2/13215)

<div class="topic-metadata">

**Author:** [@rwenderlich](https://forums.kodeco.com/u/rwenderlich)\
**Replies:** 22\
**Last updated:** [May 24, 2019, 4:35pm UTC](https://forums.kodeco.com/t/errata-for-core-data-by-tutorials-v2-2/13215 "2019-05-24T16:35:38Z")

</div>

This topic is for bugs, typos, and other mistakes in Core Data by Tutorials v2.2.

---

## [Chapter 8: Couldn't see the performance difference in Department List ViewController Tests](https://forums.kodeco.com/t/chapter-8-couldnt-see-the-performance-difference-in-department-list-viewcontroller-tests/68643)

<div class="topic-metadata">

**Author:** [@duckmole](https://forums.kodeco.com/u/duckmole)\
**Replies:** 3\
**Last updated:** [May 7, 2019, 5:14am UTC](https://forums.kodeco.com/t/chapter-8-couldnt-see-the-performance-difference-in-department-list-viewcontroller-tests/68643 "2019-05-07T05:14:57Z")

</div>

Hi, I just test the DepartmentListViewControllerTests in simulator, iPhone7Plus, iPhone6s, iPhone5s, and the time difference between testTotalEmployeesPerDepartment() and testTotalEmployeesPerDepartmentFast() is really s…

---

## [Chapter 3 - Dog Walk App (Fails when embedded in Tab Bar Controller)](https://forums.kodeco.com/t/chapter-3-dog-walk-app-fails-when-embedded-in-tab-bar-controller/69127)

<div class="topic-metadata">

**Author:** [@christ](https://forums.kodeco.com/u/christ)\
**Replies:** 2\
**Last updated:** [May 1, 2019, 1:17pm UTC](https://forums.kodeco.com/t/chapter-3-dog-walk-app-fails-when-embedded-in-tab-bar-controller/69127 "2019-05-01T13:17:33Z")

</div>

I completed Chapter 3, the Dog Walk app. It works fine and I’ve created another app based on this that also works fine BUT, when I tried embedding it in a tab bar controller it failed. As a test, I downloaded the compl…

---

## [Dog Walk Tutorial - Update Walk time](https://forums.kodeco.com/t/dog-walk-tutorial-update-walk-time/66665)

<div class="topic-metadata">

**Author:** [@saadev2017](https://forums.kodeco.com/u/saadev2017)\
**Replies:** 1\
**Last updated:** [April 30, 2019, 1:49am UTC](https://forums.kodeco.com/t/dog-walk-tutorial-update-walk-time/66665 "2019-04-30T01:49:42Z")

</div>

Can someone help!! I want to modify the walk time, and then re-save (Update). Can someone help with the sample code. for example, walk time is 4/4/19, 10:50 AM. I want to change it to something else, and UPDATE. Thank…

---

## [Using Core Data to Save Just 'Favorite' Objects](https://forums.kodeco.com/t/using-core-data-to-save-just-favorite-objects/68494)

<div class="topic-metadata">

**Author:** [@theneil](https://forums.kodeco.com/u/theneil)\
**Replies:** 6\
**Last updated:** [April 24, 2019, 9:53pm UTC](https://forums.kodeco.com/t/using-core-data-to-save-just-favorite-objects/68494 "2019-04-24T21:53:42Z")

</div>

Hi all, First of all, I love the book, and it’s been a big help, but I’ve come across a use case for Core Data which I can’t seem to work out the best-practice implementation for, and would appreciate some advice on it: …

---

## [Chapter 6: Couldn't success on real iPhone with latest iOS 12.2](https://forums.kodeco.com/t/chapter-6-couldnt-success-on-real-iphone-with-latest-ios-12-2/65985)

<div class="topic-metadata">

**Author:** [@duckmole](https://forums.kodeco.com/u/duckmole)\
**Replies:** 4\
**Last updated:** [April 8, 2019, 6:25pm UTC](https://forums.kodeco.com/t/chapter-6-couldnt-success-on-real-iphone-with-latest-ios-12-2/65985 "2019-04-08T18:25:30Z")

</div>

I running v2 version on my iPhone 7p , write some data, then running the final version. It crashed with fatalError, I don’t know if it because I update my iPhone to 12.2. private lazy var storeContainer: NSPersistentCo…

---

## [Chapter 2 page 53](https://forums.kodeco.com/t/chapter-2-page-53/61882)

<div class="topic-metadata">

**Author:** [@hcri1950](https://forums.kodeco.com/u/hcri1950)\
**Replies:** 3\
**Last updated:** [February 11, 2019, 6:22pm UTC](https://forums.kodeco.com/t/chapter-2-page-53/61882 "2019-02-11T18:22:53Z")

</div>

I have been going over the code for error has no member “tintColor” My Code I am having problems in understanding the how the code is imported into the Dictionary Can someone explain it to me please.

---

## [Latest Version? Core\_Data\_by\_Tutorials\_v5](https://forums.kodeco.com/t/latest-version-core-data-by-tutorials-v5/61852)

<div class="topic-metadata">

**Author:** [@hcri1950](https://forums.kodeco.com/u/hcri1950)\
**Replies:** 1\
**Last updated:** [February 11, 2019, 11:24am UTC](https://forums.kodeco.com/t/latest-version-core-data-by-tutorials-v5/61852 "2019-02-11T11:24:58Z")

</div>

Right of the bat I have found NUMEROUS BASIC ERRORS. page 24 on alert.addAction(saveAction) // There was no reference in creating a Func SafeAction() page 23 func tableView(\_ tableView: UITableView, cellForRowAt inde…

---

## [Chapter 4: Batch Updates question](https://forums.kodeco.com/t/chapter-4-batch-updates-question/45686)

<div class="topic-metadata">

**Author:** [@xlsmearlx](https://forums.kodeco.com/u/xlsmearlx)\
**Replies:** 2\
**Last updated:** [September 1, 2018, 3:56am UTC](https://forums.kodeco.com/t/chapter-4-batch-updates-question/45686 "2018-09-01T03:56:23Z")

</div>

Hi everyone! I have a little question regarding the Batch updates example in chapter 4. In the example the code updates all “Venues” to be my favorites like this: let batchUpdate = NSBatchUpdateRequest(entityName: "V…

---

## [P. 54: Incrementing an NSManagedObject property?](https://forums.kodeco.com/t/p-54-incrementing-an-nsmanagedobject-property/40075)

<div class="topic-metadata">

**Author:** [@7stud](https://forums.kodeco.com/u/7stud)\
**Replies:** 2\
**Last updated:** [April 29, 2018, 4:53am UTC](https://forums.kodeco.com/t/p-54-incrementing-an-nsmanagedobject-property/40075 "2018-04-29T04:53:54Z")

</div>

The book does this: let times = currentBowtie.timesWorn currentBowtie.timesWorn = times + 1 Why would’t you simply do this: currentBowtie.timesWorn += 1

---

## [Bow Ties - How does the app read SampleData.plist?](https://forums.kodeco.com/t/bow-ties-how-does-the-app-read-sampledata-plist/39983)

<div class="topic-metadata">

**Author:** [@7stud](https://forums.kodeco.com/u/7stud)\
**Replies:** 5\
**Last updated:** [March 6, 2018, 7:11am UTC](https://forums.kodeco.com/t/bow-ties-how-does-the-app-read-sampledata-plist/39983 "2018-03-06T07:11:59Z")

</div>

I’ve looked all over the project, and I can’t find any setting or code that would cause the app to read data from SampleData.plist.

---

## [Great book so far](https://forums.kodeco.com/t/great-book-so-far/38933)

<div class="topic-metadata">

**Author:** [@thomasg\_peters](https://forums.kodeco.com/u/thomasg_peters)\
**Replies:** 4\
**Last updated:** [January 27, 2018, 8:04pm UTC](https://forums.kodeco.com/t/great-book-so-far/38933 "2018-01-27T20:04:14Z")

</div>

I am enjoying the Core Data by Tutorial and getting allot out of the book. Great guide for someone like me. I am a beginner with Core Data and have allot to learn. I have pasted a paragraph here from chapter 5, page 1…

---

## [Is there a tutorial for using predicates in Swift?](https://forums.kodeco.com/t/is-there-a-tutorial-for-using-predicates-in-swift/22617)

<div class="topic-metadata">

**Author:** [@jngai](https://forums.kodeco.com/u/jngai)\
**Replies:** 4\
**Last updated:** [November 19, 2016, 3:13am UTC](https://forums.kodeco.com/t/is-there-a-tutorial-for-using-predicates-in-swift/22617 "2016-11-19T03:13:16Z")

</div>

Hi, In P.106 of this book, there’s a link to Apple’s Predicate Programming Guide. \[Predicate Programming Guide\](https://developer.apple.com/library/ios/documentation/Cocoa/Conceptual/ Predicates/AdditionalChapters/Intr…

---

## [Chapter 3, converting the relationship to unordered set (NSSet)](https://forums.kodeco.com/t/chapter-3-converting-the-relationship-to-unordered-set-nsset/18553)

<div class="topic-metadata">

**Author:** [@djdew](https://forums.kodeco.com/u/djdew)\
**Replies:** 3\
**Last updated:** [January 9, 2019, 7:13pm UTC](https://forums.kodeco.com/t/chapter-3-converting-the-relationship-to-unordered-set-nsset/18553 "2019-01-09T19:13:55Z")

</div>

Hello; The Note on page 78 states that if the walks relationship was unordered one could set the “one” side of the relationship via the following code in the “add” function: walk.dog = currentDog I’ve done so (after c…

---

## [V5 Chapter 6 Mapped migration one to many error](https://forums.kodeco.com/t/v5-chapter-6-mapped-migration-one-to-many-error/58358)

<div class="topic-metadata">

**Author:** [@thefredelement](https://forums.kodeco.com/u/thefredelement)\
**Replies:** 3\
**Last updated:** [December 31, 2018, 6:33pm UTC](https://forums.kodeco.com/t/v5-chapter-6-mapped-migration-one-to-many-error/58358 "2018-12-31T18:33:23Z")

</div>

Following the steps along to create a custom mapping model, ending at page 157, results in: 2018-12-25 12:23:38.483789-0500 UnCloudNotes\[71393:1048312\] \*\*\* Terminating app due to uncaught exception 'NSInvalidArgumentExc…

---

## [Ch 6, Saving a copy of the Data store file](https://forums.kodeco.com/t/ch-6-saving-a-copy-of-the-data-store-file/56559)

<div class="topic-metadata">

**Author:** [@afinque](https://forums.kodeco.com/u/afinque)\
**Replies:** 2\
**Last updated:** [December 25, 2018, 2:44am UTC](https://forums.kodeco.com/t/ch-6-saving-a-copy-of-the-data-store-file/56559 "2018-12-25T02:44:35Z")

</div>

Hi all, I know I’m going to realize the answer as soon as I hit send, but oh well (and maybe not), I will take one for the team. The text says “You may also want to save a copy of the data store file and append the na…

---

## [Has and Belongs to Many with extra properties in link?](https://forums.kodeco.com/t/has-and-belongs-to-many-with-extra-properties-in-link/55978)

<div class="topic-metadata">

**Author:** [@dskjflksjadlkfj](https://forums.kodeco.com/u/dskjflksjadlkfj)\
**Replies:** 3\
**Last updated:** [December 13, 2018, 4:49am UTC](https://forums.kodeco.com/t/has-and-belongs-to-many-with-extra-properties-in-link/55978 "2018-12-13T04:49:32Z")

</div>

If I wanted to do a has and belongs to many by the following object model: Object 1 -----------\>\> O1\_O2\_link \<\<------------------ Object 2 fields for link: o1: Object 1 o2: Object 2 extraProp: String where …

---

## [Errata for Core Data by Tutorials v4](https://forums.kodeco.com/t/errata-for-core-data-by-tutorials-v4/36238)

<div class="topic-metadata">

**Author:** [@mimaguire](https://forums.kodeco.com/u/mimaguire)\
**Replies:** 5\
**Last updated:** [December 12, 2018, 3:47am UTC](https://forums.kodeco.com/t/errata-for-core-data-by-tutorials-v4/36238 "2018-12-12T03:47:37Z")

</div>

It appears that Apple moved the Error Handling Programming Guide to this URL: Apple also moved the Incremental Store Programming Guide to this URL: Apple also moved the Predicate Programming Guide to this URL:

---

## [Chapter 6: "A complex mapping model"](https://forums.kodeco.com/t/chapter-6-a-complex-mapping-model/35734)

<div class="topic-metadata">

**Author:** [@wayne0714](https://forums.kodeco.com/u/wayne0714)\
**Replies:** 3\
**Last updated:** [December 4, 2018, 3:21am UTC](https://forums.kodeco.com/t/chapter-6-a-complex-mapping-model/35734 "2018-12-04T03:21:03Z")

</div>

hi I am having trouble with “A complex mapping model” section (the “UnCloudNotesMappingModel\_v3\_to\_v4” part) I followed all the steps as described in the book but I end up getting the following error: (I did not inclu…

---

## [Chapter 6, version 5.0](https://forums.kodeco.com/t/chapter-6-version-5-0/56886)

<div class="topic-metadata">

**Author:** [@afinque](https://forums.kodeco.com/u/afinque)\
**Replies:** 2\
**Last updated:** [December 4, 2018, 1:58am UTC](https://forums.kodeco.com/t/chapter-6-version-5-0/56886 "2018-12-04T01:58:36Z")

</div>

I’m in chapter 6 of the 5th version of the book and getting the following error: “Argument passed to call that takes no arguments” on the following line of let newAttachment = ImageAttachment(entity: description!, ins…

---

## [Dog Walk tutorial](https://forums.kodeco.com/t/dog-walk-tutorial/36652)

<div class="topic-metadata">

**Author:** [@joachimfh](https://forums.kodeco.com/u/joachimfh)\
**Replies:** 1\
**Last updated:** [November 1, 2018, 3:46am UTC](https://forums.kodeco.com/t/dog-walk-tutorial/36652 "2018-11-01T03:46:29Z")

</div>

Hi, I am following your Dog Walk tutorial, and try implement it in my own project. However my main storyboard is different because I have a UITabBarController. So I found out that I need to rewrite the following: func a…

---

## [Chapter 6.seems somehow confusing](https://forums.kodeco.com/t/chapter-6-seems-somehow-confusing/35750)

<div class="topic-metadata">

**Author:** [@simons1994](https://forums.kodeco.com/u/simons1994)\
**Replies:** 1\
**Last updated:** [November 1, 2018, 3:41am UTC](https://forums.kodeco.com/t/chapter-6-seems-somehow-confusing/35750 "2018-11-01T03:41:51Z")

</div>

Somehow confusing(( Thanks:blush: everyone in advance. Why do we need NotesListViewController+Additions.h file in the starter project? Is it really necessary?\` if it necessary then why? @interface NotesListViewControll…

[Previous page](https://forums.kodeco.com/c/books/core-data-by-tutorials/12.md?page=1)

[Next page](https://forums.kodeco.com/c/books/core-data-by-tutorials/12.md?page=3)
