In my MAUI project i use Ralm package 10.13.0.
Whe i try to login with LogInAsync method the application hang without exceptions.
Here is the code:
private async Task<Realms.Realm> InitializeAsync()
{
var appconfig = new Realms.Sync.AppConfiguration(_AppID);
Realms.Realm realm;
Realms.Sync.PartitionSyncConfiguration syncConfig;
try
{
var app = Realms.Sync.App.Create(appconfig);
if (app.CurrentUser == null)
{
Realms.Sync.User user = await app.LogInAsync(Realms.Sync.Credentials.Anonymous());
syncConfig = new Realms.Sync.PartitionSyncConfiguration(_Partition, user);
realm = await Realms.Realm.GetInstanceAsync(syncConfig);
}
else
{
syncConfig = new Realms.Sync.PartitionSyncConfiguration(_Partition, app.CurrentUser);
realm = Realms.Realm.GetInstance(syncConfig);
}
return realm;
}
catch
{
throw;
}
}
What is wrong?