I'm using RealmSwift in Xcode 10.2 and Swift4.2.
I made following code.
import Foundation
import RealmSwift
enum MyEnum {
case enum1
case enum2
case enum3
}
class MyClass: Object {
@objc dynamic var title = ""
@objc dynamic var myEnum: MyEnum?
}
Following error has been occurred when I build.
'dynamic' property 'myEnum' must also be '@objc'
As you can see, @objc
is already added for myEnum
variable, so I'm confused.
This error is occurred only for Enum variable.
Would you give me any solutions or advices ?