// // This method is invoked when the application has loaded and is ready to run. In this // method you should instantiate the window, load the UI into it and then make the window // visible. // // You have 17 seconds to return from this method, or iOS will terminate your application. // public override bool FinishedLaunching(UIApplication app, NSDictionary options) { app.StatusBarHidden = true; global::Xamarin.Forms.Forms.Init(); Microsoft.WindowsAzure.MobileServices.CurrentPlatform.Init(); SQLitePCL.CurrentPlatform.Init(); if (UIDevice.CurrentDevice.CheckSystemVersion(8, 0)) { var settings = UIUserNotificationSettings.GetSettingsForTypes(UIUserNotificationType.Sound | UIUserNotificationType.Alert | UIUserNotificationType.Badge, null); UIApplication.SharedApplication.RegisterUserNotificationSettings(settings); UIApplication.SharedApplication.RegisterForRemoteNotifications(); } else { UIApplication.SharedApplication.RegisterForRemoteNotificationTypes(UIRemoteNotificationType.Badge | UIRemoteNotificationType.Sound | UIRemoteNotificationType.Alert); } var formsApp = new ContosoMoments.App(); LoadApplication(formsApp); Facebook.CoreKit.ApplicationDelegate.SharedInstance.FinishedLaunching(app, options); return base.FinishedLaunching(app, options); }
// // This method is invoked when the application has loaded and is ready to run. In this // method you should instantiate the window, load the UI into it and then make the window // visible. // // You have 17 seconds to return from this method, or iOS will terminate your application. // public override bool FinishedLaunching(UIApplication app, NSDictionary options) { app.StatusBarHidden = true; global::Xamarin.Forms.Forms.Init(); Microsoft.WindowsAzure.MobileServices.CurrentPlatform.Init(); SQLitePCL.CurrentPlatform.Init(); if (UIDevice.CurrentDevice.CheckSystemVersion(8, 0)) { var settings = UIUserNotificationSettings.GetSettingsForTypes(UIUserNotificationType.Sound | UIUserNotificationType.Alert | UIUserNotificationType.Badge, null); UIApplication.SharedApplication.RegisterUserNotificationSettings(settings); UIApplication.SharedApplication.RegisterForRemoteNotifications(); } else { UIApplication.SharedApplication.RegisterForRemoteNotificationTypes(UIRemoteNotificationType.Badge | UIRemoteNotificationType.Sound | UIRemoteNotificationType.Alert); } var formsApp = new ContosoMoments.App(); LoadApplication(formsApp); Facebook.CoreKit.ApplicationDelegate.SharedInstance.FinishedLaunching(app, options); return(base.FinishedLaunching(app, options)); }