I'm using Realm
with Codeable
. I noticed that Bool
& Int
attributes aren't added to the table in Realm Browser
as shown in ScreenShot.
How to fix this issue?
To make optional int's and bool's in Realm, they must be defined as RealmOptional.
So update your model like this
@objcMembers class CategoryDoc: Object: Codeable {
dynamic var name: String?
let isActive = RealmOptional<Int>()
let v = RealmOptional<Bool>()