Actually, I want to apply the check before opening the Realm is there is any way to check whether the path has provided is present in realm database or not also if present want to check whether the schema is already present or not like

consider having realm with name myrealm.realm

var realm ={ path:'myrealm.realm', schema:[ { name: 'Dog', 
   properties: {name : 'string'}} , { name: 'Person', properties: { name : 
   'string'}} ]}).then( (realmInstance) => {
    realmInstance.objects('Customer').isValid() // this must return false as 
    customer is not present but it shows exception 

Please suggest method to validate schema

0 Answers