Beginning Core Data - Part 3: Managed Object | Ray Wenderlich

Learn how to use managed object subclasses to easily manipulate your data.


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/3813-beginning-core-data/lessons/3

Users need to change the Codegen of the Entity to Manual/None otherwise when you create the NSManagedObjectSubclass, it will create it twice, one in your project folder and another in derived data.

Credit: ios - invalid redeclaration in auto code generate NSManagedObject Subclass Swift 3 - Stack Overflow

Thanks for sharing the tip @rajee.afterhoursdev!

Bug report, In the challenge project you may :

  • Allow app to access to photo: add 'Privacy - Photo Library Usage Description" to info.pList

  • pictureImageView outlet is missing: You have to connect it from the storyboard to TargetCollectionViewCell class

Anyway great course Luke :grinning:

I wish I read this sooner! I found the same thing the hard way. Then I also found out that you need to do this for every entity in your data model!!! If you donโ€™t, you will get an error code 1, which is ambiguous at best.
Cheers!

I downloaded and run .
Itโ€™s good on my macbook.
But when i run on on my iPhone 6, iOS 10.0.1 I got error "dyld: Library not loaded: @rpath/libswiftCore.dylib
Referenced from: /var/containers/Bundle/Application/C9380543-715A-4274-9DFE-9414393149DF/HitList.app/HitList
Reason: no suitable image found. Did find:
/private/var/containers/Bundle/Application/C9380543-715A-4274-9DFE-9414393149DF/HitList.app/Frameworks/libswiftCore.dylib: code signing blocked mmap() of โ€˜/private/var/containers/Bundle/Application/C9380543-715A-4274-9DFE-9414393149DF/HitList.app/Frameworks/libswiftCore.dylibโ€™
(lldb) ". Please help me to solve this

@luke_parham Can you please help with this when you get a chance? Thank you - much appreciated! :]