Local Realm open after synchronized on realm cloud

The code was for version <= 6
im trying to figure it out to handle data without connection after i have synced a realm in version >= 10