コード例 #1
0
ファイル: Program.cs プロジェクト: unchase/App
        public static async Task Main()
        {
            RealmService.InitializeOfflineDatabase();

            var config = AppConfig.GetConfig();

            await RealmService.InitializeCloudSync(config.RealmServerUrl, config.RealmDatabase);
        }
コード例 #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();
        }