Exemple #1
0
        protected override async void OnStart()
        {
            if (IsOnStartCalled)
            {
                return;
            }

            var config = AppConfig.GetConfig();

            AppCenter.Start(
                $"ios={config.AppCenteriOSKey};android={config.AppCenterAndroidKey};",
                typeof(Analytics),
                typeof(Crashes),
                typeof(Push));

            Analytics.TrackEvent("AppStarted", new Dictionary <string, string>()
            {
                { nameof(config.AppCenterAndroidKey), config.AppCenterAndroidKey },
                { nameof(config.AppCenteriOSKey), config.AppCenteriOSKey },
                { nameof(config.RealmServerUrl), config.RealmServerUrl },
                { nameof(config.RealmDatabase), config.RealmDatabase },
                { "TimeZone", TimeZoneInfo.Local.ToSerializedString() }
            });

            await RealmService.InitializeCloudSync(config.RealmServerUrl, config.RealmDatabase);

            IsOnStartCalled = true;
        }
Exemple #2
0
        public static async Task Main()
        {
            RealmService.InitializeOfflineDatabase();

            var config = AppConfig.GetConfig();

            await RealmService.InitializeCloudSync(config.RealmServerUrl, config.RealmDatabase);
        }