public bool FinishedLaunching(UIApplication application, NSDictionary launchOptions) { Window = new UIWindow(UIScreen.MainScreen.Bounds); if (Globals.Database.Table <CloudModel>().Count() > 0) { Window.RootViewController = UIStoryboard.FromName("Main", NSBundle.MainBundle).InstantiateViewController("MainScreen"); if (PHPhotoLibrary.AuthorizationStatus == PHAuthorizationStatus.Authorized && Globals.Database.CheckSetting(UserSettings.AutoBackupPhotos, "1")) { application.SetMinimumBackgroundFetchInterval(UIApplication.BackgroundFetchIntervalMinimum); } } else { Window.RootViewController = UIStoryboard.FromName("Main", NSBundle.MainBundle).InstantiateViewController("WelcomeScreen"); application.SetMinimumBackgroundFetchInterval(UIApplication.BackgroundFetchIntervalNever); } Window.MakeKeyAndVisible(); if (networkNotification == null) { networkNotification = CFNotificationCenter.Darwin.AddObserver(Notifications.NetworkChange, null, ObserveNetworkChange, CFNotificationSuspensionBehavior.Coalesce); } return(true); }
/// <inheritdoc /> public override bool FinishedLaunching(UIApplication uiApplication, NSDictionary launchOptions) { ExecutingPlatform.Current = AppPlatform.iOS; ConfigurationManager.Initialise(PortableStream.Current); InitLogger(); #if !DEBUG AppCenter.Start(ConfigurationManager.AppSettings["IosAppcenterSecret"], typeof(Analytics), typeof(Crashes)); #endif RegisterServices(); Forms.Init(); FormsMaterial.Init(); Material.Init(); LoadApplication(new App()); Popup.Init(); UIApplication.SharedApplication.StatusBarStyle = UIStatusBarStyle.BlackOpaque; uiApplication.SetMinimumBackgroundFetchInterval(MINIMUM_BACKGROUND_FETCH_INTERVAL); UIApplication.SharedApplication.SetMinimumBackgroundFetchInterval(UIApplication.BackgroundFetchIntervalMinimum); RunAppStartAsync().FireAndForgetSafeAsync(); return(base.FinishedLaunching(uiApplication, launchOptions)); }
public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions) { // Override point for customization after application launch. // If not required for your application you can safely delete this method // Code to start the Xamarin Test Cloud Agent #if ENABLE_TEST_CLOUD Xamarin.Calabash.Start(); #endif application.SetMinimumBackgroundFetchInterval(UIApplication.BackgroundFetchIntervalMinimum); UIUserNotificationSettings settings = UIUserNotificationSettings.GetSettingsForTypes(UIUserNotificationType.Alert | UIUserNotificationType.Badge | UIUserNotificationType.Sound, new NSSet()); application.RegisterUserNotificationSettings(settings); window = new UIWindow(UIScreen.MainScreen.Bounds); UINavigationController navCont = new UINavigationController(); //navCont.NavigationController.NavigationBar.Translucent = true; //PokktDemoOptionVC optionVC = new PokktDemoOptionVC("PokktDemoOptionVC", null); //navCont.PushViewController(optionVC, true); //window.RootViewController = navCont; DemoSelector demoSelector = new DemoSelector("DemoSelector", null); navCont.PushViewController(demoSelector, true); window.RootViewController = navCont; window.MakeKeyAndVisible(); return(true); }
public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions) { // Override point for customization after application launch. // If not required for your application you can safely delete this method // Code to start the Xamarin Test Cloud Agent #if ENABLE_TEST_CLOUD Xamarin.Calabash.Start(); #endif application.SetMinimumBackgroundFetchInterval(UIApplication.BackgroundFetchIntervalMinimum); if (AppCenter.Configured == false) { Push.PushNotificationReceived += async(sender, e) => { var summary = $"Push notification received:" + $"\n\tNotification title: {e.Title}" + $"\n\tMessage: {e.Message}"; if (e.CustomData != null) { summary += "\n\tCustom data:\n"; foreach (var key in e.CustomData.Keys) { summary += $"\t\t{key} : {e.CustomData[key]}\n"; System.Diagnostics.Debug.WriteLine(summary); if (_httpClient == null) { _httpClient = new HttpClient(); } var urlString = $"https://jsonplaceholder.typicode.com/posts/"; var responseMessage = await _httpClient.GetAsync(urlString); var responseString = await responseMessage?.Content?.ReadAsStringAsync(); Console.WriteLine(responseString); } } }; } AppCenter.Start("27d898e4-8c05-4fcf-ac05-700620be6fec", typeof(Push), typeof(Analytics), typeof(Crashes)); return(true); }
/// <inheritdoc /> public override bool FinishedLaunching(UIApplication app, NSDictionary options) { #if !DEBUG AppCenter.Start("3893339f-4e2d-40a9-b415-46ce59c23a8f", typeof(Analytics), typeof(Crashes)); #endif app.SetMinimumBackgroundFetchInterval(UIApplication.BackgroundFetchIntervalMinimum); UIApplication.SharedApplication.SetMinimumBackgroundFetchInterval(UIApplication.BackgroundFetchIntervalMinimum); ApplicationContext.DbPath = GetLocalFilePath(); SQLitePCL.Batteries.Init(); Popup.Init(); return(base.FinishedLaunching(app, options)); }
/// <inheritdoc /> public override bool FinishedLaunching(UIApplication app, NSDictionary options) { ConfigurationManager.Initialise(PCLAppConfig.FileSystemStream.PortableStream.Current); #if !DEBUG AppCenter.Start(ConfigurationManager.AppSettings["IosAppcenterSecret"], typeof(Analytics), typeof(Crashes)); #endif app.SetMinimumBackgroundFetchInterval(UIApplication.BackgroundFetchIntervalMinimum); UIApplication.SharedApplication.SetMinimumBackgroundFetchInterval(UIApplication.BackgroundFetchIntervalMinimum); ApplicationContext.DbPath = GetLocalFilePath(); SQLitePCL.Batteries.Init(); Popup.Init(); return(base.FinishedLaunching(app, options)); }
public override bool FinishedLaunching(UIApplication uiApplication, NSDictionary launchOptions) { ZXing.Net.Mobile.Forms.iOS.Platform.Init(); XFGloss.iOS.Library.Init(); XamEffects.iOS.Effects.Init(); RoundedBoxViewRenderer.Init(); ProgressRingRenderer.Init(); Xamarin.FormsMaps.Init(); Xamarin.FormsGoogleMaps.Init("AIzaSyDnC69vNlEd0nv9-nnI5NDFY2zj6WChPOw"); Stormlion.PhotoBrowser.iOS.Platform.Init(); global::Xamarin.Forms.Forms.Init(); RegisterServiceContainers(); //Countly initialization var config = new CountlyConfig() { AppKey = Config.CountlyAppKey, Host = Config.CountlyServerURL, //EnableDebug = true, Features = new NSObject[] { CountlySDK.Constants.CLYCrashReporting } }; Countly.SharedInstance().StartWithConfig(config); Countly.SharedInstance().BeginSession(); LoadApplication(new App()); uiApplication.SetStatusBarStyle(UIStatusBarStyle.BlackOpaque, false); uiApplication.SetMinimumBackgroundFetchInterval(3600); if (UIDevice.CurrentDevice.CheckSystemVersion(8, 0)) { var notificationSettings = UIUserNotificationSettings.GetSettingsForTypes( UIUserNotificationType.Alert | UIUserNotificationType.Badge | UIUserNotificationType.Sound, null ); uiApplication.RegisterUserNotificationSettings(notificationSettings); } RegisterRemoteNotifications(); return(base.FinishedLaunching(uiApplication, launchOptions)); }
/// <inheritdoc /> public override bool FinishedLaunching(UIApplication app, NSDictionary options) { ConfigurationManager.Initialise(PCLAppConfig.FileSystemStream.PortableStream.Current); #if !DEBUG AppCenter.Start("3893339f-4e2d-40a9-b415-46ce59c23a8f", typeof(Analytics), typeof(Crashes)); #endif UINavigationBar.Appearance.BarTintColor = StyleHelper.PrimaryColor.ToUIColor(); UINavigationBar.Appearance.TintColor = UIColor.White; UIApplication.SharedApplication.StatusBarStyle = UIStatusBarStyle.BlackOpaque; app.SetMinimumBackgroundFetchInterval(MINIMUM_BACKGROUND_FETCH_INTERVAL); UIApplication.SharedApplication.SetMinimumBackgroundFetchInterval(UIApplication.BackgroundFetchIntervalMinimum); ApplicationContext.DbPath = GetLocalFilePath(); SQLitePCL.Batteries.Init(); Popup.Init(); return(base.FinishedLaunching(app, options)); }
public override bool FinishedLaunching (UIApplication application, NSDictionary launchOptions) { this.LaunchActions = new Queue<Action<CheckPointController>>(); this.Commands = new CommandManager(); LoadOptions(); application.SetMinimumBackgroundFetchInterval(UIApplication.BackgroundFetchIntervalMinimum); var PerformAdditionalHandling = true; if (launchOptions != null) { this.LastShortcutItem = launchOptions[UIApplication.LaunchOptionsShortcutItemKey] as UIApplicationShortcutItem; PerformAdditionalHandling = (LastShortcutItem == null); } this.Window = new UIWindow(UIScreen.MainScreen.Bounds); var root = new RootViewController(); this.Sidebar = root.SideBar; Window.RootViewController = root; Window.MakeKeyAndVisible(); this.DataModelConstructor = new Task<DataModel>(() => { DataModel dm; using (new TrackingBenchmark() { Category = "DataModel", Name = "Load" }) dm = new DataModel(DefaultDataProvider); return dm; }); this.DataModelConstructor.Start(); ThreadPool.QueueUserWorkItem((s) => { this.Notifications = new NotificationManager(); this.EnsureIntegrations(); }); return PerformAdditionalHandling; }
/// <inheritdoc /> public override bool FinishedLaunching(UIApplication app, NSDictionary options) { ConfigurationManager.Initialise(PortableStream.Current); #if !DEBUG AppCenter.Start(ConfigurationManager.AppSettings["IosAppcenterSecret"], typeof(Analytics), typeof(Crashes)); #endif UINavigationBar.Appearance.BarTintColor = StyleHelper.PrimaryColor.ToUIColor(); UINavigationBar.Appearance.TintColor = UIColor.White; UIApplication.SharedApplication.StatusBarStyle = UIStatusBarStyle.BlackOpaque; app.SetMinimumBackgroundFetchInterval(MINIMUM_BACKGROUND_FETCH_INTERVAL); UIApplication.SharedApplication.SetMinimumBackgroundFetchInterval(UIApplication.BackgroundFetchIntervalMinimum); EfCoreContext.DbPath = GetLocalFilePath(); Batteries.Init(); Popup.Init(); return(base.FinishedLaunching(app, options)); }