Ejemplo n.º 1
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            Vapolia.WheelPickerForms.Ios.WheelPickerRenderer.InitializeForms();

            Rg.Plugins.Popup.Popup.Init();

            Forms.Init();

            var application = new App();
            var color       = ((Color)application.Resources["HeaderFooterBackgroundColor"]).ToUIColor();

            //Vapolia.WheelPickerForms.Ios.WheelPickerRenderer.InitializeForms();

            UINavigationBar.Appearance.BarTintColor        = color;         //bar background
            UINavigationBar.Appearance.TintColor           = UIColor.White; //Tint color of button items
            UINavigationBar.Appearance.TitleTextAttributes = new UIStringAttributes {
                ForegroundColor = UIColor.White
            };                                                                                                                     //Tint color of button items
            UISwitch.Appearance.OnTintColor = color;
            UIApplication.SharedApplication.SetStatusBarStyle(UIStatusBarStyle.LightContent, true);

            var tint = Xamarin.Forms.Color.FromRgb(145, 198, 2).ToUIColor();

            UIAlertView.Appearance.TintColor = tint;
            UIView.AppearanceWhenContainedIn(typeof(UIAlertController)).TintColor        = tint;
            UIView.AppearanceWhenContainedIn(typeof(UIActivityViewController)).TintColor = tint;
            UIView.AppearanceWhenContainedIn(typeof(SLComposeViewController)).TintColor  = tint;

            new SfPdfDocumentViewRenderer();
            SfPickerRenderer.Init();
            CachedImageRenderer.Init();

            LoadApplication(application);
            return(base.FinishedLaunching(app, options));
        }
Ejemplo n.º 2
0
        //
        // 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)
        {
            var tint = UIColor.FromRGB(10, 149, 145);

            tint = UIColor.FromRGB(15, 173, 194);
            //UINavigationBar.Appearance.BarTintColor = UIColor.FromRGB(250, 250, 250); //bar background
            //UINavigationBar.Appearance.TintColor = tint; //Tint color of button items

            //UIBarButtonItem.Appearance.TintColor = tint; //Tint color of button items

            UITabBar.Appearance.TintColor = tint;

            UITextAttributes txtAttributes = new UITextAttributes
            {
                Font = UIFont.FromName("Montserrat-Regular", 9.0F)
            };

            UITabBarItem.Appearance.SetTitleTextAttributes(txtAttributes, UIControlState.Normal);


            UISwitch.Appearance.OnTintColor = tint;

            UIAlertView.Appearance.TintColor = tint;

            //serve per elimare l'ombra nella barra header per creare continuità con il content sottostante
            UINavigationBar.Appearance.ShadowImage = new UIImage();
            //UINavigationBar.Appearance.SetTitleTextAttributes(txtAttributes);

            UIView.AppearanceWhenContainedIn(typeof(UIAlertController)).TintColor        = tint;
            UIView.AppearanceWhenContainedIn(typeof(UIActivityViewController)).TintColor = tint;
            UIView.AppearanceWhenContainedIn(typeof(SLComposeViewController)).TintColor  = tint;
            global::Xamarin.Forms.Forms.Init();
            LoadApplication(new App());
            return(base.FinishedLaunching(app, options));
        }
Ejemplo n.º 3
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            var tint = UIColor.FromRGB(118, 53, 235);

            UINavigationBar.Appearance.BarTintColor = UIColor.FromRGB(250, 250, 250); //bar background
            UINavigationBar.Appearance.TintColor    = tint;                           //Tint color of button items
            UIBarButtonItem.Appearance.TintColor    = tint;                           //Tint color of button items
            UITabBar.Appearance.TintColor           = tint;
            UISwitch.Appearance.OnTintColor         = tint;
            UIAlertView.Appearance.TintColor        = tint;
            UIView.AppearanceWhenContainedIn(typeof(UIAlertController)).TintColor        = tint;
            UIView.AppearanceWhenContainedIn(typeof(UIActivityViewController)).TintColor = tint;
            UIView.AppearanceWhenContainedIn(typeof(SLComposeViewController)).TintColor  = tint;

            //#if !ENABLE_TEST_CLOUD

            if (!string.IsNullOrWhiteSpace(ApiKeys.MobileCenterId) && ApiKeys.MobileCenterId != nameof(ApiKeys.MobileCenterId))
            {
                MobileCenter.Start(ApiKeys.MobileCenterId, typeof(Analytics), typeof(Crashes));
            }

            global::Xamarin.Forms.Forms.Init();
            Toolkit.Init();

            // Code for starting up the Xamarin Test Cloud Agent
#if ENABLE_TEST_CLOUD
            Xamarin.Calabash.Start();
#endif
            SelectedTabPageRenderer.Initialize();
            PullToRefreshLayoutRenderer.Init();
            ImageCircle.Forms.Plugin.iOS.ImageCircleRenderer.Init();
            new FreshEssentials.iOS.AdvancedFrameRendereriOS();
            LoadApplication(new App());
            return(base.FinishedLaunching(app, options));
        }
Ejemplo n.º 4
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            var tint = UIColor.FromRGB(255, 31, 115);

            UINavigationBar.Appearance.BarTintColor = tint;
            UINavigationBar.Appearance.TintColor    = tint;
            UIBarButtonItem.Appearance.TintColor    = tint;
            UITabBar.Appearance.TintColor           = tint;
            UISwitch.Appearance.OnTintColor         = tint;
            UIAlertView.Appearance.TintColor        = tint;

            UIView.AppearanceWhenContainedIn(typeof(UIAlertController)).TintColor        = tint;
            UIView.AppearanceWhenContainedIn(typeof(UIActivityViewController)).TintColor = tint;
            UIView.AppearanceWhenContainedIn(typeof(SLComposeViewController)).TintColor  = tint;

            UIApplication.SharedApplication.StatusBarStyle = UIStatusBarStyle.LightContent;

            global::Xamarin.Forms.Forms.Init();
            global::ImageCircle.Forms.Plugin.iOS.ImageCircleRenderer.Init();
            global::CachedImageCircle.Forms.Plugin.iOS.CachedImageCircleRenderer.Init();

            LoadApplication(new Portable.App());

            return(base.FinishedLaunching(app, options));
        }
        public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
        {
            // Example of how to override UIAppearance on a View Controller basis
            this.Window.TintColor = UIColor.Red;
            UIView.AppearanceWhenContainedIn(new System.Type[] { typeof(ApptentiveNavigationController) }).TintColor = UIColor.White;

            // Override point for customization after application launch.
            // If not required for your application you can safely delete this method
            ApptentiveConfiguration configuration = new ApptentiveConfiguration("Your Apptentive App Key", "Your Apptentive App Signature");

            configuration.LogLevel = ApptentiveLogLevel.Verbose;
            Apptentive.Shared.Register(configuration, null);

            UNUserNotificationCenter.Current.RequestAuthorization((UNAuthorizationOptions.Sound | UNAuthorizationOptions.Alert), (Boolean Success, NSError Error) =>
            {
                if (Success)
                {
                    Console.WriteLine("Successfully got notification permission.");
                }
                else if (Error != null)
                {
                    Console.WriteLine("Failed to get notification permission: " + Error.LocalizedDescription);
                }
            });

            UIApplication.SharedApplication.RegisterForRemoteNotifications();

            UNUserNotificationCenter.Current.Delegate = Apptentive.Shared;

            return(true);
        }
Ejemplo n.º 6
0
        //
        // 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)
        {
            var tint = UIColor.FromRGB(0, 79, 138);

            // Some basic navigationbar styling.
            UINavigationBar.Appearance.BarTintColor = UIColor.FromRGB(250, 250, 250); //bar background
            UINavigationBar.Appearance.TintColor    = tint;                           //Tint color of button items

            UIBarButtonItem.Appearance.TintColor = tint;                              //Tint color of button items

            UITabBar.Appearance.TintColor = tint;

            UISwitch.Appearance.OnTintColor = tint;

            UIAlertView.Appearance.TintColor = tint;

            UIView.AppearanceWhenContainedIn(typeof(UIAlertController)).TintColor        = tint;
            UIView.AppearanceWhenContainedIn(typeof(UIActivityViewController)).TintColor = tint;
            UIView.AppearanceWhenContainedIn(typeof(SLComposeViewController)).TintColor  = tint;

            global::Xamarin.Forms.Forms.Init();

            ImageCircle.Forms.Plugin.iOS.ImageCircleRenderer.Init();

            LoadApplication(new App());

            return(base.FinishedLaunching(app, options));
        }
Ejemplo n.º 7
0
        void ApplyNativeStyle()
        {
            var view = UIView.AppearanceWhenContainedIn(typeof(UIAlertController));

            view.TintColor = Styles.Styles.CurrentStyle.AccentColor.ToUIColor();
            UINavigationBar.Appearance.TitleTextAttributes = new UIStringAttributes {
                ForegroundColor = view.TintColor
            };
        }
Ejemplo n.º 8
0
        //
        // 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)
        //{
        //    //Xamarin.Calabash.Start();
        //    global::Xamarin.Forms.Forms.Init();

        //    LoadApplication(new App());

        //    return base.FinishedLaunching(app, options);
        //}
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            Debug.WriteLine("FinishedLaunching function");
            global::Xamarin.Forms.Forms.Init();
            Xamarin.FormsMaps.Init();
            global::Xamarin.Auth.Presenters.XamarinIOS.AuthenticationConfiguration.Init();
            Debug.WriteLine("Finished Init()");
            //GoogleClientManager.Initialize();
            LoadApplication(new App());
            Debug.WriteLine("Finished LoadApp()");
            //Task.Delay(1500).Wait();
            base.FinishedLaunching(app, options);
            Debug.WriteLine("Finished base.FinishedLaunching");
            RegisterForRemoteNotifications();
            Debug.WriteLine("Finished RegisterForRemoteNotification()");

            UINavigationBar.Appearance.TintColor = Color.FromHex("#FFFFFF").ToUIColor();

            //UIView statusBar = UIApplication.SharedApplication.ValueForKey(new NSString("statusBar")) as UIView;
            //if (statusBar != null && statusBar.RespondsToSelector(new ObjCRuntime.Selector("setBackgroundColor:")))
            //{
            //    // change to your desired color
            //    statusBar.BackgroundColor = Color.FromHex("#7f6550").ToUIColor();
            //}

            // Color of the selected tab icon:
            UITabBar.Appearance.SelectedImageTintColor = Color.FromHex("#a0050f").ToUIColor();

            // Color of the tabbar background:
            //UITabBar.Appearance.BarTintColor = UIColor.FromRGB(247, 247, 247);

            // Color of the selected tab text color:
            UITabBarItem.Appearance.SetTitleTextAttributes(
                new UITextAttributes()
            {
                TextColor = Color.FromHex("#a0050f").ToUIColor()
            },
                UIControlState.Selected);

            // Color of the unselected tab icon & text:
            UITabBarItem.Appearance.SetTitleTextAttributes(
                new UITextAttributes()
            {
                TextColor = Color.FromHex("#000000").ToUIColor()
            },
                UIControlState.Normal);
            UIView.AppearanceWhenContainedIn(typeof(UIAlertView)).TintColor       = Color.FromHex("#a0050f").ToUIColor();
            UIView.AppearanceWhenContainedIn(typeof(UIAlertController)).TintColor = Color.FromHex("#a0050f").ToUIColor();
            return(true);
        }
Ejemplo n.º 9
0
        static void InitializeThemeColors()
        {
            // Set up appearance after loading theme resources in App.xaml
            PrimaryColor = ((Color)Xamarin.Forms.Application.Current.Resources["Primary"]).ToUIColor();
            UINavigationBar.Appearance.BarTintColor = ((Color)Xamarin.Forms.Application.Current.Resources["BarBackgroundColor"]).ToUIColor();
            UINavigationBar.Appearance.TintColor    = PrimaryColor;          //Tint color of button items
            UIBarButtonItem.Appearance.TintColor    = PrimaryColor;          //Tint color of button items
            UITabBar.Appearance.TintColor           = PrimaryColor;
            UISwitch.Appearance.OnTintColor         = PrimaryColor;
            UIAlertView.Appearance.TintColor        = PrimaryColor;

            UIView.AppearanceWhenContainedIn(typeof(UIAlertController)).TintColor        = PrimaryColor;
            UIView.AppearanceWhenContainedIn(typeof(UIActivityViewController)).TintColor = PrimaryColor;
            UIView.AppearanceWhenContainedIn(typeof(SLComposeViewController)).TintColor  = PrimaryColor;
        }
Ejemplo n.º 10
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            var tint = UIColor.FromRGB(71, 57, 87);

            UINavigationBar.Appearance.BarTintColor = UIColor.FromRGB(71, 57, 87); //bar background
            UINavigationBar.Appearance.TintColor    = tint;                        //Tint color of button items

            UIBarButtonItem.Appearance.TintColor = tint;                           //Tint color of button items

            UITabBar.Appearance.TintColor = tint;


            UISwitch.Appearance.OnTintColor = tint;

            UIAlertView.Appearance.TintColor = tint;

            UIView.AppearanceWhenContainedIn(typeof(UIAlertController)).TintColor        = tint;
            UIView.AppearanceWhenContainedIn(typeof(UIActivityViewController)).TintColor = tint;
            UIView.AppearanceWhenContainedIn(typeof(SLComposeViewController)).TintColor  = tint;

            global::Xamarin.Forms.Forms.Init();
            CachedImageRenderer.Init();
            var ignore = new CircleTransformation();


            //ImageCircleRenderer.Init();

            //SQLite.CurrentPlatform.Init();
            //Xamarin.FormsMaps.Init();

            SQLitePCL.Batteries_V2.Init();
            // Xamarin.FormsMaps.Init();

            // Code for starting up the Xamarin Test Cloud Agent
#if ENABLE_TEST_CLOUD
            Xamarin.Calabash.Start();
#endif

            Appearance.Configure();

            /*var manager = BITHockeyManager.SharedHockeyManager;
             * manager.Configure("357505c40ba44b329fe4fd9694e6fa44");
             * manager.StartManager();*/

            LoadApplication(new App());

            return(base.FinishedLaunching(app, options));
        }
Ejemplo n.º 11
0
        //
        // 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 launchOptions)
        {
            NSUrlCache.SharedCache.RemoveAllCachedResponses();

            UIView.AppearanceWhenContainedIn(new [] { typeof(UIAlertController) }).TintColor = new UIColor((nfloat)0x06 / 0xFF, (nfloat)0x6A / 0xFF, (nfloat)0xB9 / 0xFF, 1.0f);

            App.InitializeServiceLocator(RegisterPlatformTypes);

            InitializeExposureNotificationClient();

            Xamarin.Forms.Forms.SetFlags("RadioButton_Experimental");

            global::Xamarin.Forms.Forms.Init();
            global::Xamarin.Forms.FormsMaterial.Init();

            FFImageLoading.Forms.Platform.CachedImageRenderer.Init();
            global::FFImageLoading.ImageService.Instance.Initialize(new FFImageLoading.Config.Configuration());


            _notificationCenterDelegate.OnRecieved += async(UserNotificationCenterDelegate sender, UNNotificationResponse response) =>
            {
                var navigationParameters = new NavigationParameters();
                await AppInstance?.NavigateToSplashAsync(Destination.ContactedNotifyPage, navigationParameters);
            };
            UNUserNotificationCenter.Current.Delegate = _notificationCenterDelegate;

            LoadApplication(new App());

            if (!IsUniversalLinks(launchOptions) && !IsLocalNotification(launchOptions))
            {
                InvokeOnMainThread(async() => await AppInstance?.NavigateToSplashAsync(Destination.HomePage, new NavigationParameters()));
            }

            UIApplication.SharedApplication.SetMinimumBackgroundFetchInterval(UIApplication.BackgroundFetchIntervalMinimum);

            try
            {
                _exposureDetectionBackgroundService.Value.Schedule();
            }
            catch (Exception exception)
            {
                _loggerService.Value.Exception("failed to Scheduling", exception);
            }

            return(base.FinishedLaunching(app, launchOptions));
        }
Ejemplo n.º 12
0
        //
        // 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)
        {
            Rg.Plugins.Popup.Popup.Init();

            var s = new Syncfusion.SfAutoComplete.XForms.iOS.SfAutoCompleteRenderer();

            global::Xamarin.Forms.Forms.Init();

            Xamarin.FormsGoogleMaps.Init("AIzaSyCkavYT01FceMj7jrEhkOvvMQxNvt-P_cc");

            SfPullToRefreshRenderer.Init();

            SfListViewRenderer.Init();

            CarouselView.FormsPlugin.iOS.CarouselViewRenderer.Init();

            FloatingActionButtonRenderer.InitRenderer();

            SegmentedControlRenderer.Init();

            LoadApplication(new App());


            var tint = ((Xamarin.Forms.Color)Xamarin.Forms.Application.Current.Resources["BottomTabTextTint"]).ToUIColor();

            UIView.AppearanceWhenContainedIn(typeof(UIAlertController)).TintColor        = tint;
            UIView.AppearanceWhenContainedIn(typeof(UIActivityViewController)).TintColor = tint;
            UIView.AppearanceWhenContainedIn(typeof(SLComposeViewController)).TintColor  = tint;


            UITabBar.Appearance.TintColor = tint;

            var result = base.FinishedLaunching(app, options);

            UIApplication.SharedApplication.StatusBarHidden = false;

            return(result);
        }
Ejemplo n.º 13
0
        public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
        {
            #region UI
            var tint = UIColor.FromRGB(3, 169, 244);
            UINavigationBar.Appearance.BarTintColor = UIColor.FromRGB(250, 250, 250); //bar background
            UINavigationBar.Appearance.TintColor    = tint;                           //Tint color of button items

            UIBarButtonItem.Appearance.TintColor = tint;                              //Tint color of button items

            UITabBar.Appearance.TintColor = tint;

            UISwitch.Appearance.OnTintColor = tint;

            UIAlertView.Appearance.TintColor = tint;

            UIView.AppearanceWhenContainedIn(typeof(UIAlertController)).TintColor        = tint;
            UIView.AppearanceWhenContainedIn(typeof(UIActivityViewController)).TintColor = tint;
            #endregion

            Forms.Init();

#if ENABLE_TEST_CLOUD
            Xamarin.Calabash.Start();
            //Mapping StyleId to iOS Labels
            Forms.ViewInitialized += (object sender, ViewInitializedEventArgs e) =>
            {
                if (null != e.View.StyleId)
                {
                    e.NativeView.AccessibilityIdentifier = e.View.StyleId;
                }
            };
#endif

            LoadApplication(new App());

            return(base.FinishedLaunching(application, launchOptions));
        }
Ejemplo n.º 14
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            var tint = UIColor.FromRGB(207, 80, 55);

            UINavigationBar.Appearance.BarTintColor = UIColor.FromRGB(255, 233, 200); //bar background
            UINavigationBar.Appearance.TintColor    = tint;                           //Tint color of button items

            UIBarButtonItem.Appearance.TintColor = tint;                              //Tint color of button items

            UITabBar.Appearance.TintColor = tint;

            UISwitch.Appearance.OnTintColor = tint;

            UIAlertView.Appearance.TintColor = tint;

            UIView.AppearanceWhenContainedIn(typeof(UIAlertController)).TintColor        = tint;
            UIView.AppearanceWhenContainedIn(typeof(UIActivityViewController)).TintColor = tint;
            UIView.AppearanceWhenContainedIn(typeof(SLComposeViewController)).TintColor  = tint;

            Forms.Init();
            FormsMaps.Init();
            Toolkit.Init();

            // Code for starting up the Xamarin Test Cloud Agent

            SetMinimumBackgroundFetchInterval();

            //Random Inits for Linking out.
            Microsoft.WindowsAzure.MobileServices.CurrentPlatform.Init();
            SQLitePCL.CurrentPlatform.Init();
            Plugin.Share.ShareImplementation.ExcludedUIActivityTypes = new List <NSString>
            {
                UIActivityType.PostToFacebook,
                UIActivityType.AssignToContact,
                UIActivityType.OpenInIBooks,
                UIActivityType.PostToVimeo,
                UIActivityType.PostToFlickr,
                UIActivityType.SaveToCameraRoll
            };
            ImageCircle.Forms.Plugin.iOS.ImageCircleRenderer.Init();
            NonScrollableListViewRenderer.Initialize();
            SelectedTabPageRenderer.Initialize();
            TextViewValue1Renderer.Init();
            PullToRefreshLayoutRenderer.Init();

            open.conference.app.Utils.Helpers.Settings.SqlitePath = GetSqlitePlatformPath();

            LoadApplication(new OpenConferenceApplication(new IosInitializer()));



            // Process any potential notification data from launch
            ProcessNotification(options);

            NSNotificationCenter.DefaultCenter.AddObserver(UIApplication.DidBecomeActiveNotification, DidBecomeActive);



            try
            {
                return(base.FinishedLaunching(app, options));
            }
            catch (Exception ex)
            {
                var test = "";
                throw;
            }
        }
Ejemplo n.º 15
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            var tint = UIColor.FromRGB(236, 47, 75);

            UINavigationBar.Appearance.BarTintColor = UIColor.FromRGB(47, 46, 46); //bar background
            UINavigationBar.Appearance.TintColor    = tint;                        //Tint color of button items

            UIBarButtonItem.Appearance.TintColor = tint;                           //Tint color of button items

            UITabBar.Appearance.TintColor = tint;

            UISwitch.Appearance.OnTintColor = tint;

            UIAlertView.Appearance.TintColor = tint;

            UIView.AppearanceWhenContainedIn(typeof(UIAlertController)).TintColor        = tint;
            UIView.AppearanceWhenContainedIn(typeof(UIActivityViewController)).TintColor = tint;
            UIView.AppearanceWhenContainedIn(typeof(SLComposeViewController)).TintColor  = tint;

#if !DEBUG
            if (!string.IsNullOrWhiteSpace(ApiKeys.VSMobileCenterApiKeyIOS))
            {
                Microsoft.AppCenter.AppCenter
                .Start(ApiKeys.VSMobileCenterApiKeyIOS,
                       typeof(Analytics),
                       typeof(Crashes));
            }
#endif
            Firebase.Core.App.Configure();

            LabelHtml.Forms.Plugin.iOS.HtmlLabelRenderer.Initialize();
            Forms.Init();
            FormsMaps.Init();
            Toolkit.Init();
            global::Xamarin.Auth.Presenters.XamarinIOS.AuthenticationConfiguration.Init();

            //Random Inits for Linking out.
            Plugin.Share.ShareImplementation.ExcludedUIActivityTypes = new List <NSString>
            {
                UIActivityType.PostToFacebook,
                UIActivityType.AssignToContact,
                UIActivityType.OpenInIBooks,
                UIActivityType.PostToVimeo,
                UIActivityType.PostToFlickr,
                UIActivityType.SaveToCameraRoll
            };
            ImageCircle.Forms.Plugin.iOS.ImageCircleRenderer.Init();
            NonScrollableListViewRenderer.Initialize();
            SelectedTabPageRenderer.Initialize();
            TextViewValue1Renderer.Init();
            PullToRefreshLayoutRenderer.Init();
            Syncfusion.SfRating.XForms.iOS.SfRatingRenderer.Init();

            LoadApplication(new App());

            NSNotificationCenter.DefaultCenter.AddObserver(UIApplication.DidBecomeActiveNotification, DidBecomeActive);

            // This method verifies if you have been logged into the app before, and keep you logged in after you reopen or kill your app.
            //bool valid = Facebook.CoreKit.ApplicationDelegate.SharedInstance.FinishedLaunching(app, options);
            //
            return(base.FinishedLaunching(app, options));
        }
Ejemplo n.º 16
0
        //
        // 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.
        //

        //static AppDelegate()
        //{
        //    global::Xamarin.Forms.Forms.Init();
        //}

        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            global::Xamarin.Forms.Forms.Init();

            var x = typeof(JWChinese.iOS.GridViewRender);

            UIApplication.SharedApplication.SetStatusBarStyle(UIStatusBarStyle.LightContent, false);
            UIApplication.SharedApplication.SetStatusBarHidden(false, false);

            var tint = UIColor.FromRGB(47, 100, 168);

            //UINavigationBar.Appearance.TitleTextAttributes = new UIStringAttributes() { ForegroundColor = UIColor.White };
            UINavigationBar.Appearance.SetTitleTextAttributes(new UITextAttributes {
                TextColor = UIColor.White
            });                                                   //title text color

            UINavigationBar.Appearance.BarTintColor = tint;       //bar background
            //UINavigationBar.Appearance.BarTintColor = UIColor.FromRGB(232, 234, 237); //bar background
            UINavigationBar.Appearance.TintColor = UIColor.White; //Tint color of button items

            //UIBarButtonItem.Appearance.TintColor = tint; //Tint color of bar button items

            UITabBar.Appearance.TintColor = tint;

            UISwitch.Appearance.OnTintColor = tint;

            UIAlertView.Appearance.TintColor = tint;

            UIView.AppearanceWhenContainedIn(typeof(UIAlertController)).TintColor        = tint;
            UIView.AppearanceWhenContainedIn(typeof(UIActivityViewController)).TintColor = tint;
            UIView.AppearanceWhenContainedIn(typeof(SLComposeViewController)).TintColor  = tint;

            // Another way to do statusbar background color to white
            var statusBar = UIApplication.SharedApplication.ValueForKey(new NSString("statusBar")) as UIView;

            if (statusBar.RespondsToSelector(new ObjCRuntime.Selector("setBackgroundColor:")))
            {
                statusBar.BackgroundColor = tint;
            }

            CarouselViewRenderer.Init();

            Corcav.Behaviors.Infrastructure.Init();

            // Super important for ios size type to px
            if (DeviceHardware.Version.Equals(DeviceHardware.IOSHardware.iPhone3G) ||
                DeviceHardware.Version.Equals(DeviceHardware.IOSHardware.iPhone3GS))
            {
                App.IOSSizeProportion = 1;
            }
            else if (DeviceHardware.Version.Equals(DeviceHardware.IOSHardware.iPhone4) ||
                     DeviceHardware.Version.Equals(DeviceHardware.IOSHardware.iPhone4CDMA) ||
                     DeviceHardware.Version.Equals(DeviceHardware.IOSHardware.iPhone4RevA) ||
                     DeviceHardware.Version.Equals(DeviceHardware.IOSHardware.iPhone4S) ||
                     DeviceHardware.Version.Equals(DeviceHardware.IOSHardware.iPhone5CDMAGSM) ||
                     DeviceHardware.Version.Equals(DeviceHardware.IOSHardware.iPhone5GSM) ||
                     DeviceHardware.Version.Equals(DeviceHardware.IOSHardware.İPhone6) ||
                     DeviceHardware.Version.Equals(DeviceHardware.IOSHardware.İPhone6S) ||
                     DeviceHardware.Version.Equals(DeviceHardware.IOSHardware.İPhoneSE))
            {
                App.IOSSizeProportion = 2;
            }
            else
            {
                App.IOSSizeProportion = 3;
            }

            LoadApplication(new App());

            UpdateRotation(UIApplication.SharedApplication);

            //UIDevice.Notifications.ObserveOrientationDidChange((s, e) =>
            //{
            //    UpdateOrientationInformationSoThatICanCorrectTheGridViewLayoutParadigmFunction();

            //});
            return(base.FinishedLaunching(app, options));
        }
Ejemplo n.º 17
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            var tint = UIColor.FromRGB(118, 53, 235);

            UINavigationBar.Appearance.BarTintColor = UIColor.FromRGB(250, 250, 250); //bar background
            UINavigationBar.Appearance.TintColor    = tint;                           //Tint color of button items

            UIBarButtonItem.Appearance.TintColor = tint;                              //Tint color of button items

            UITabBar.Appearance.TintColor = tint;

            UISwitch.Appearance.OnTintColor = tint;

            UIAlertView.Appearance.TintColor = tint;

            UIView.AppearanceWhenContainedIn(typeof(UIAlertController)).TintColor        = tint;
            UIView.AppearanceWhenContainedIn(typeof(UIActivityViewController)).TintColor = tint;
            UIView.AppearanceWhenContainedIn(typeof(SLComposeViewController)).TintColor  = tint;

            #if !ENABLE_TEST_CLOUD
            if (!string.IsNullOrWhiteSpace(ApiKeys.HockeyAppiOS) && ApiKeys.HockeyAppiOS != nameof(ApiKeys.HockeyAppiOS))
            {
                var manager = BITHockeyManager.SharedHockeyManager;
                manager.Configure(ApiKeys.HockeyAppiOS);

                //Disable update manager
                manager.DisableUpdateManager = true;

                manager.StartManager();
                //manager.Authenticator.AuthenticateInstallation();
            }
            #endif

            Forms.Init();
            FormsMaps.Init();
            Toolkit.Init();

            AppIndexing.SharedInstance.RegisterApp(618319027);

            ZXing.Net.Mobile.Forms.iOS.Platform.Init();
            // Code for starting up the Xamarin Test Cloud Agent
            #if ENABLE_TEST_CLOUD
            Xamarin.Calabash.Start();
            //Mapping StyleId to iOS Labels
            Forms.ViewInitialized += (object sender, ViewInitializedEventArgs e) =>
            {
                if (null != e.View.StyleId)
                {
                    e.NativeView.AccessibilityIdentifier = e.View.StyleId;
                }
            };
            #endif

            SetMinimumBackgroundFetchInterval();

            //Random Inits for Linking out.
            Microsoft.WindowsAzure.MobileServices.CurrentPlatform.Init();
            SQLitePCL.CurrentPlatform.Init();
            Plugin.Share.ShareImplementation.ExcludedUIActivityTypes = new List <NSString>
            {
                UIActivityType.PostToFacebook,
                UIActivityType.AssignToContact,
                UIActivityType.OpenInIBooks,
                UIActivityType.PostToVimeo,
                UIActivityType.PostToFlickr,
                UIActivityType.SaveToCameraRoll
            };
            ImageCircle.Forms.Plugin.iOS.ImageCircleRenderer.Init();
            ZXing.Net.Mobile.Forms.iOS.Platform.Init();
            NonScrollableListViewRenderer.Initialize();
            SelectedTabPageRenderer.Initialize();
            TextViewValue1Renderer.Init();
            PullToRefreshLayoutRenderer.Init();
            LoadApplication(new App());



            // Process any potential notification data from launch
            ProcessNotification(options);

            NSNotificationCenter.DefaultCenter.AddObserver(UIApplication.DidBecomeActiveNotification, DidBecomeActive);



            return(base.FinishedLaunching(app, options));
        }
Ejemplo n.º 18
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            var tint = UIColor.FromRGB(118, 53, 235);

            UINavigationBar.Appearance.BarTintColor = UIColor.FromRGB(250, 250, 250); //bar background
            UINavigationBar.Appearance.TintColor    = tint;                           //Tint color of button items

            UIBarButtonItem.Appearance.TintColor = tint;                              //Tint color of button items

            UITabBar.Appearance.TintColor = tint;

            UISwitch.Appearance.OnTintColor = tint;

            UIAlertView.Appearance.TintColor = tint;

            UIView.AppearanceWhenContainedIn(typeof(UIAlertController)).TintColor        = tint;
            UIView.AppearanceWhenContainedIn(typeof(UIActivityViewController)).TintColor = tint;
            UIView.AppearanceWhenContainedIn(typeof(SLComposeViewController)).TintColor  = tint;


            Forms.Init();
            FormsMaps.Init();
            Toolkit.Init();

            ZXing.Net.Mobile.Forms.iOS.Platform.Init();
            // Code for starting up the Xamarin Test Cloud Agent
            #if ENABLE_TEST_CLOUD
            Xamarin.Calabash.Start();
            //Mapping StyleId to iOS Labels
            Forms.ViewInitialized += (object sender, ViewInitializedEventArgs e) =>
            {
                if (null != e.View.StyleId)
                {
                    e.NativeView.AccessibilityIdentifier = e.View.StyleId;
                }
            };
            #endif

            SetMinimumBackgroundFetchInterval();

            //Random Inits for Linking out.
            Microsoft.WindowsAzure.MobileServices.CurrentPlatform.Init();

            ImageCircle.Forms.Plugin.iOS.ImageCircleRenderer.Init();
            ZXing.Net.Mobile.Forms.iOS.Platform.Init();
            NonScrollableListViewRenderer.Initialize();
            SelectedTabPageRenderer.Initialize();
            TextViewValue1Renderer.Init();
            PullToRefreshLayoutRenderer.Init();
            LoadApplication(new App());



            // Process any potential notification data from launch
            ProcessNotification(options);

            NSNotificationCenter.DefaultCenter.AddObserver(UIApplication.DidBecomeActiveNotification, DidBecomeActive);



            return(base.FinishedLaunching(app, options));
        }
Ejemplo n.º 19
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            var tint = UIColor.FromRGB(118, 53, 235);

            UINavigationBar.Appearance.BarTintColor = UIColor.FromRGB(250, 250, 250); //bar background
            UINavigationBar.Appearance.TintColor    = tint;                           //Tint color of button items

            UIBarButtonItem.Appearance.TintColor = tint;                              //Tint color of button items

            UITabBar.Appearance.TintColor = tint;

            UISwitch.Appearance.OnTintColor = tint;

            UIAlertView.Appearance.TintColor = tint;

            UIView.AppearanceWhenContainedIn(typeof(UIAlertController)).TintColor        = tint;
            UIView.AppearanceWhenContainedIn(typeof(UIActivityViewController)).TintColor = tint;
            UIView.AppearanceWhenContainedIn(typeof(SLComposeViewController)).TintColor  = tint;

#if !ENABLE_TEST_CLOUD
            if (!string.IsNullOrWhiteSpace(ApiKeys.HockeyAppiOS) && ApiKeys.HockeyAppiOS != nameof(ApiKeys.HockeyAppiOS))
            {
                var manager = BITHockeyManager.SharedHockeyManager;
                manager.Configure(ApiKeys.HockeyAppiOS);

                // Disable update manager
                manager.DisableUpdateManager  = false;
                manager.DisableMetricsManager = false;

                manager.StartManager();
                manager.Authenticator.AuthenticateInstallation(); // This line is obsolete in crash only builds
            }
#endif

            Forms.Init();
            FormsMaps.Init();
            Toolkit.Init();
            CrossMedia.Current.Initialize();
            AsNumAssemblyHelper.HoldAssembly();
            // Image caching package
            CachedImageRenderer.Init();                        // https://github.com/daniel-luberda/DLToolkit.Forms.Controls/tree/master/TagEntryView

            AppIndexing.SharedInstance.RegisterApp(618319027); // https://components.xamarin.com/gettingstarted/googleiosappindexing

            //ZXing.Net.Mobile.Forms.iOS.Platform.Init();

            // Code for starting up the Xamarin Test Cloud Agent
#if ENABLE_TEST_CLOUD
            Xamarin.Calabash.Start();  // https://developer.xamarin.com/guides/testcloud/calabash/introduction-to-calabash/

            // Mapping StyleId to iOS Labels
            Forms.ViewInitialized += (object sender, ViewInitializedEventArgs e) =>
            {
                if (null != e.View.StyleId)
                {
                    e.NativeView.AccessibilityIdentifier = e.View.StyleId;
                }
            };
#endif

            SetMinimumBackgroundFetchInterval();

            // Random Inits for Linking out.
            Microsoft.WindowsAzure.MobileServices.CurrentPlatform.Init();

            // Initialization only needed on iOS for offline Sync
            SQLitePCL.CurrentPlatform.Init();  // https://docs.microsoft.com/en-us/azure/app-service-mobile/app-service-mobile-xamarin-forms-get-started-offline-data

            // Excude for iOS
            Plugin.Share.ShareImplementation.ExcludedUIActivityTypes = new List <NSString> // https://github.com/jguertl/SharePlugin
            {
                UIActivityType.PostToFacebook,
                UIActivityType.AssignToContact,
                UIActivityType.OpenInIBooks,
                UIActivityType.PostToVimeo,
                UIActivityType.PostToFlickr,
                UIActivityType.SaveToCameraRoll
            };

            ImageCircle.Forms.Plugin.iOS.ImageCircleRenderer.Init(); // https://github.com/jamesmontemagno/ImageCirclePlugin
            //    ZXing.Net.Mobile.Forms.iOS.Platform.Init(); // https://components.xamarin.com/view/zxing.net.mobile

            NonScrollableListViewRenderer.Initialize();
            SelectedTabPageRenderer.Initialize();
            TextViewValue1Renderer.Init();

            PullToRefreshLayoutRenderer.Init(); // https://github.com/jamesmontemagno/Xamarin.Forms-PullToRefreshLayout

            LoadApplication(new App());

            // Process any potential notification data from launch
            ProcessNotification(options);

            NSNotificationCenter.DefaultCenter.AddObserver(UIApplication.DidBecomeActiveNotification, DidBecomeActive);

            MessagingService.Current.Subscribe <string>(MessageKeys.LoggedIn, async(m, role) =>
            {
                var push = DependencyService.Get <IPushNotifications>();
                await push.RegisterForNotifications();
            });

            return(base.FinishedLaunching(app, options));
            //bool alertsAllowed = false;
            //UNUserNotificationCenter.Current.GetNotificationSettings((settings) =>
            //{
            //    alertsAllowed = (settings.AlertSetting == UNNotificationSetting.Enabled);
            //    if (!alertsAllowed)
            //    {
            //        // Request notification permissions from the user
            //        UNUserNotificationCenter.Current.RequestAuthorization(UNAuthorizationOptions.Alert, (approved, err) =>
            //        {
            //            // Handle approval
            //            var push = DependencyService.Get<IPushNotifications>();
            //            push?.RegisterForNotifications();
            //        });
            //    }
            //});

            // return ret;
        }