Swift 2, warning: could not load any Objective-C class information from the dyld shared cache

后端 未结 5 1483
青春惊慌失措
青春惊慌失措 2021-02-04 23:43

I have found a few questions regarding this issue, yet none of them were helping with my problem. I am trying to save an object to core data using this code (which worked perfec

5条回答
  •  醉话见心
    2021-02-05 00:07

    What helped me in similar problem (xCode 7, Swift 2):

    reading this question

    Or more quickly without explaining the reason of solution: just comment @objc(className) in your NSManagedObjectSubclass , that was generated from your CoreData Entity (@objc(Patient) - in your case ).

    This solution (if issue still appears) does not applicable to xCode 7.1/Swift 2.1, as the way of generating NSManagedObjectSubclasses was changed.

    Don't forget about cleaning your project (Product > Clean) and deleting the app from your device/simulator to replace CoreData storage on it.

提交回复
热议问题