public static async Task Main() { RealmService.InitializeOfflineDatabase(); var config = AppConfig.GetConfig(); await RealmService.InitializeCloudSync(config.RealmServerUrl, config.RealmDatabase); }
public App() { // workaround for https://github.com/realm/realm-dotnet/issues/1967 if (Xamarin.Forms.Device.RuntimePlatform != Xamarin.Forms.Device.iOS) { SyncConfigurationBase.Initialize(UserPersistenceMode.NotEncrypted); } VersionTracking.Track(); var language = LanguageService.GetCurrentLanguage(); AppResources.Culture = new CultureInfo(language.GetLanguageCode()); if (!IsAppCtorCalled) { RealmService.InitializeOfflineDatabase(); IsAppCtorCalled = true; } this.InitializeComponent(); this.MainPage = new AppShell(); }