Skip to content

Instantly share code, notes, and snippets.

@arslnb
Created July 20, 2017 10:11
Show Gist options
  • Save arslnb/b4bedbcd597e13be315129e0f7f7d6ba to your computer and use it in GitHub Desktop.
Save arslnb/b4bedbcd597e13be315129e0f7f7d6ba to your computer and use it in GitHub Desktop.
OpenAsync issue code
Realm.Sync.User.login('http://<SERVER-IP>:9080', <USERNAME>, <PASSWORD>, (error, user) => {
if(!error){
Realm.openAsync({
schema: [SomeSchema],
sync: {
user: user,
url: 'realm://<SERVER-IP>:9080/data'
}}, (error, realm) => {
if (error) {
}
console.log(realm);
});
} else {
console.error(error);
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment