Ejemplo n.º 1
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            global::Xamarin.Forms.Forms.Init();

            //Profile.EnableUpdatesOnAccessTokenChange(true);
            //Settings.AppID = appId;
            //Settings.DisplayName = appName;


            //TODO:push notification falta integrar ios
            app.UnregisterForRemoteNotifications();
            var pushSettings = UIUserNotificationSettings.GetSettingsForTypes(
                UIUserNotificationType.Alert |
                UIUserNotificationType.Badge |
                UIUserNotificationType.Sound,
                null
                );

            app.RegisterUserNotificationSettings(pushSettings);
            app.RegisterForRemoteNotifications();


            UISwitch.Appearance.OnTintColor = Color.FromHex("#548EBD").ToUIColor();

            UINavigationBar.Appearance.TintColor = Color.White.ToUIColor();
            //establecer color de fondo sin esto, al levantar el album de photos no se distinguen los titulos
            UINavigationBar.Appearance.BarTintColor = Color.FromHex("#1C5885").ToUIColor();
            UINavigationBar.Appearance.SetTitleTextAttributes(new UITextAttributes()
            {
                TextColor = UIColor.White
            });
            //PlotProjects.Plugin.Plot.GetInstance(options, true);
            ImageCircleRenderer.Init();
            Xamarin.FormsMaps.Init();
            Xamarin.IQKeyboardManager.SharedManager.Enable = true;
            //IQKeyboardManager.SharedManager.Enable = true;

            App.CurrentVersion = NSBundle.MainBundle.InfoDictionary["CFBundleVersion"].ToString();

            LoadApplication(new App());

            return(base.FinishedLaunching(app, options));
        }
Ejemplo n.º 2
0
 /// This method is called when the application is about to terminate. Save data, if needed.
 public override void WillTerminate(UIApplication application)
 {
     application.UnregisterForRemoteNotifications();
 }