Esempio n. 1
0
        public static async Task Main()
        {
            RealmService.InitializeOfflineDatabase();

            var config = AppConfig.GetConfig();

            await RealmService.InitializeCloudSync(config.RealmServerUrl, config.RealmDatabase);
        }
Esempio n. 2
0
        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();
        }