As in the case of Realm Swift v0.95.0, the set of classes of the specified Realm stores can be set using the objectTypes property on Realm.Configuration .
let configA = Realm.Configuration(fileURL: realmFileURL, objectTypes: [Dog.self, Owner.self]) let realmA = Realm(configuration: configA) let configB = Realm.Configuration(fileURL: otherRealmFileURL, objectTypes: [Product.self]) let realmB = Realm(configuration: configB)
realmA can only store instances of Dog and Owner when realmB can only store an instance of Product .
source share