You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a class VideoEntry that conforms to Realmable. One of the properties on said class is season of type EntrySeason?. In AppDelegate I put both Realmable and EntrySeason in the register function but I am still met with an error stating that "'Property 'season' is declared as 'EntrySeason', which is not a supported RLMObject property type". See code snippets below.
Note that the error is thrown the second that DataManager (and therefore Realm) is initialized.
I have tried this with and without the configuration.objectTypes being set.
Currently, optional enums are not supported. What you could do is to create a fileprivate enum with an additional case none, use it as a replacement for nil case:
fileprivateenum_EntrySeason:String,RealmableEnumString,Codable{case winter ="WINTER"case spring ="SPRING"case summer ="SUMMER"case fall ="FALL"case none
}finalclassVideoEntry:Realmable,Entry,Codable{//...fileprivatevar_season:_EntrySeason=.none
//... }extensionVideoEntry{varseason:EntrySeason?{returnEntrySeason(rawValue: _sesion.rawValue)}}
I have a class
VideoEntry
that conforms toRealmable
. One of the properties on said class isseason
of typeEntrySeason?
. In AppDelegate I put bothRealmable
andEntrySeason
in the register function but I am still met with an error stating that "'Property 'season' is declared as 'EntrySeason', which is not a supported RLMObject property type". See code snippets below.Note that the error is thrown the second that DataManager (and therefore Realm) is initialized.
I have tried this with and without the
configuration.objectTypes
being set.VideoEntry
EntrySeason
AppDelegate Statements
DataManager
Full error:
Thanks in advance for the help.
The text was updated successfully, but these errors were encountered: