swift_dynamicCastClassUnconditional issues in swift

后端 未结 1 501
旧时难觅i
旧时难觅i 2021-01-24 08:36

I have the following NSManagedObject in swift:

import Foundation
import CoreData

public class User: NSManagedObject {

    @NSManaged public var fi         


        
相关标签:
1条回答
  • 2021-01-24 09:17

    I got the solution here:

    Swift: Breakpoint in CoreData library

    Basically I had to put @objc(User) right above managed object code. So as per below:

    @objc(User)
    public class User: NSManagedObject {
        @NSManaged public var first_name: String
        @NSManaged public var last_name: String
    }
    

    This solved the problem. Case closed.

    0 讨论(0)
提交回复
热议问题