Пример #1
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();
            XfxControls.Init();
            Xamarin.Forms.Forms.Init();
            KeyboardOverlapRenderer.Init();
            SfPickerRenderer.Init();

            SfListViewRenderer.Init();
            CachedImageRenderer.Init();
            var ignore = typeof(SvgCachedImage);

            LoadApplication(new App());

            base.FinishedLaunching(app, options);


            // test
            //UINavigationBar.Appearance.SetBackgroundImage(new UIImage(), UIBarMetrics.Default);
            //UINavigationBar.Appearance.ShadowImage = new UIImage();
            //UINavigationBar.Appearance.BackgroundColor = UIColor.Clear;
            UINavigationBar.Appearance.TintColor = UIColor.White;
            UINavigationBar.Appearance.SetTitleTextAttributes(new UITextAttributes {
                TextColor = UIColor.White
            });
            //UINavigationBar.Appearance.BarTintColor = UIColor.FromPatternImage(UIImage.FromFile("TopBar.png"));
            //UINavigationBar.Appearance.Translucent = true;

            return(true);
        }
Пример #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)
        {
            global::Xamarin.Forms.Forms.Init();
            KeyboardOverlapRenderer.Init();

            var corSW = UIColor.FromRGB(140, 198, 63);

            UINavigationBar.Appearance.BackgroundColor = corSW;
            UINavigationBar.Appearance.TintColor       = UIColor.White;
            UINavigationBar.Appearance.BarTintColor    = corSW;
            UINavigationBar.Appearance.SetBackgroundImage(new UIImage(), UIBarPosition.Any, UIBarMetrics.Default);
            UINavigationBar.Appearance.ShadowImage = new UIImage();
            UINavigationBar.Appearance.SetTitleTextAttributes(new UITextAttributes()
            {
                TextColor = UIColor.White
            });

            UITabBar.Appearance.BackgroundColor = corSW;
            UITabBar.Appearance.BarTintColor    = corSW;
            UITabBar.Appearance.TintColor       = UIColor.White;

            UIDatePicker.Appearance.TintColor = UIColor.Gray;

            new SfChartRenderer();

            LoadApplication(new App());

            return(base.FinishedLaunching(app, options));
        }
Пример #3
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)
 {
     global::Xamarin.Forms.Forms.Init();
     LoadApplication(new App());
     KeyboardOverlapRenderer.Init();
     return(base.FinishedLaunching(app, options));
 }
Пример #4
0
        public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
        {
            AppCenter.Start("bca33005-cfef-486e-ae2b-5237cd93a727",
                            typeof(Analytics), typeof(Crashes));

            Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense(SYNC_FUSION_KEY);

            new Syncfusion.SfAutoComplete.XForms.iOS.SfAutoCompleteRenderer();

            var realmConfiguration = new Realms.RealmConfiguration();

            realmConfiguration.ShouldDeleteIfMigrationNeeded = true;
            Realms.RealmConfiguration.DefaultConfiguration   = realmConfiguration;

            Forms.Init();
            OxyPlot.Xamarin.Forms.Platform.iOS.PlotViewRenderer.Init();
            KeyboardOverlapRenderer.Init();
            AppInitializerViewModel.Initialize();
            AppDomain.CurrentDomain.UnhandledException += (sender, e) => {
                System.Diagnostics.Debug.WriteLine(e.ToString());
            };

            Window = new UIWindow(UIScreen.MainScreen.Bounds);

            var viewController = new LaunchScreen().CreateViewController();

            SetAsMainScreen(viewController);
            return(true);
        }
Пример #5
0
 void InitializeAssembly()
 {
     KeyboardOverlapRenderer.Init();
     CachedImageRenderer.Init();
     AsNum.XFControls.iOS.AsNumAssemblyHelper.HoldAssembly();
     DuGu.XFLib.iOS.Controls.Init();
     //Acr.UserDialogs.UserDialogs.Init();
 }
Пример #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)
        {
            global::Xamarin.Forms.Forms.Init();
            LoadApplication(new App());
            KeyboardOverlapRenderer.Init();
            UIApplication.SharedApplication.IdleTimerDisabled = true; //Keep screen on

            return(base.FinishedLaunching(app, options));
        }
Пример #7
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)
        {
            Forms.Init();
            CachedImageRenderer.Init();
            LoadApplication(new CntApp.App());
            KeyboardOverlapRenderer.Init();

            return(base.FinishedLaunching(app, options));
        }
Пример #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)
        {
            global::Xamarin.Forms.Forms.Init();
            LoadApplication(new App());

            //https://devlinduldulao.pro/how-to-fix-keyboard-overlapping-or-covering-entry/
            KeyboardOverlapRenderer.Init();

            return(base.FinishedLaunching(app, options));
        }
Пример #9
0
        public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
        {
            KeyboardOverlapRenderer.Init();
            CrossPushNotification.Initialize <CrossPushNotificationListener>();
            StaticDataModel.isFromNotification = false;
            StaticDataModel.DeviceHeight       = (double)UIScreen.MainScreen.Bounds.Height;
            StaticDataModel.DeviceWidth        = (double)UIScreen.MainScreen.Bounds.Width;

            if (UIDevice.CurrentDevice.CheckSystemVersion(8, 0))
            {
                var pushSettings = UIUserNotificationSettings.GetSettingsForTypes(
                    UIUserNotificationType.Alert | UIUserNotificationType.Badge | UIUserNotificationType.Sound,
                    new NSSet());

                UIApplication.SharedApplication.RegisterUserNotificationSettings(pushSettings);
                UIApplication.SharedApplication.ApplicationIconBadgeNumber = -1;
                UIApplication.SharedApplication.RegisterForRemoteNotifications();
            }
            else
            {
                UIRemoteNotificationType notificationTypes = UIRemoteNotificationType.Alert | UIRemoteNotificationType.Badge | UIRemoteNotificationType.Sound;
                UIApplication.SharedApplication.RegisterForRemoteNotificationTypes(notificationTypes);
            }
            ///Language selector page
            Login.dictionary2 = NSUserDefaults.StandardUserDefaults.DictionaryForKey(Login.key2);
            if (Login.dictionary2 == null)
            {
                var device = StaticMethods.DeviceType();
                if (device == "ipad")
                {
                    var Loginviewcontroller = GetViewController(Main_ArabicStoryboard, "LanguageSelectorIpad");
                    SetRootViewController(Loginviewcontroller, false);
                }
                else
                {
                    var Loginviewcontroller = GetViewController(Main_ArabicStoryboard, "LanguageSelector");
                    SetRootViewController(Loginviewcontroller, false);
                }
            }
            else
            {
                AutoLoginProcess(false);
            }

            StaticDataModel.DeviceId = UIKit.UIDevice.CurrentDevice.IdentifierForVendor.AsString();
            Console.WriteLine(StaticDataModel.DeviceId);
            //Changing current language
            //StaticMethods.ChangeLocalization("en");
            //StaticDataModel.CurrentLanguage = "en";

            return(true);
        }
Пример #10
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)
        {
            global::Xamarin.Forms.Forms.Init();

            KeyboardOverlapRenderer.Init();
            SfListViewRenderer.Init();
            SfPullToRefreshRenderer.Init();
            SfBusyIndicatorRenderer.Init();

            LoadApplication(new App());

            return(base.FinishedLaunching(app, options));
        }
Пример #11
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            InitFacebook();

            Forms.Init();

            CachedImageRenderer.Init();
            KeyboardOverlapRenderer.Init();

            App.OnContainerSet += RegisterNativeServices;
            LoadApplication(new App());

            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)
        {
            Xamarin.Calabash.Start();
            global::Xamarin.Forms.Forms.Init();

            KeyboardOverlapRenderer.Init();

            ZXing.Net.Mobile.Forms.iOS.Platform.Init();
            Stormlion.PhotoBrowser.iOS.Platform.Init();

            LoadApplication(new App());

            return(base.FinishedLaunching(app, options));
        }
Пример #13
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)
        {
            #region plugin init
            Rg.Plugins.Popup.Popup.Init();
            Stormlion.PhotoBrowser.iOS.Platform.Init();
            XLabsInit();
            TintedImageRenderer.Init();
            #endregion

            Xamarin.Calabash.Start();
            global::Xamarin.Forms.Forms.Init();
            LoadApplication(new App());
            KeyboardOverlapRenderer.Init();
            return(base.FinishedLaunching(app, options));
        }
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            global::Xamarin.Forms.Forms.Init();

            /*
             * Platform Specific Code for shift up page when keyboard onload
             * Source   :   Git Hub - Nuget Package
             * Link     :   https://github.com/paulpatarinski/Xamarin.Forms.Plugins/tree/master/KeyboardOverlap
             */
            KeyboardOverlapRenderer.Init();

            LoadApplication(new App());

            return(base.FinishedLaunching(app, options));
        }
Пример #15
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)
        {
            global::Xamarin.Forms.Forms.Init();
            LoadApplication(new App());
            KeyboardOverlapRenderer.Init();
            AzurePushNotificationManager.Initialize(Constants.ListenConnectionString, Constants.NotificationHubName, options, true);
            AzurePushNotificationManager.CurrentNotificationPresentationOption = UNNotificationPresentationOptions.Alert | UNNotificationPresentationOptions.Badge;
            CrossAzurePushNotification.Current.RegisterAsync(new string[] { "ios", "general" });


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


            return(base.FinishedLaunching(app, options));
        }
Пример #16
0
        public override bool FinishedLaunching(
            UIApplication uiApplication,
            NSDictionary launchOptions
            )
        {
            RegisterPlatformDependencies();

            Forms.Init();
            FormsMaterial.Init();
            KeyboardOverlapRenderer.Init();

            LoadApplication(new App());

            SetStyle();

            return(base.FinishedLaunching(uiApplication, launchOptions));
        }
Пример #17
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            global::Xamarin.Forms.Forms.Init();

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

            DependencyService.Register <ToastNotificatorImplementation>(); // Register your dependency
            ToastNotificatorImplementation.Init();                         //you can pass additional parameters here
            KeyboardOverlapRenderer.Init();

            LoadApplication(new App());

            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)
        {
            global::Xamarin.Forms.Forms.Init();
            KeyboardOverlapRenderer.Init();

            //Set Navigation bar colors
            UINavigationBar.Appearance.BarTintColor = Color.FromHex("#175081").ToUIColor();
            UINavigationBar.Appearance.TintColor    = UIColor.White;
            UINavigationBar.Appearance.SetTitleTextAttributes(
                new UITextAttributes {
                TextColor = Color.White.ToUIColor()
            });

            LoadApplication(new App());

            return(base.FinishedLaunching(app, options));
        }
Пример #19
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)
        {
#if DEBUG
            Xamarin.Calabash.Start();
#endif
#if ENABLE_TEST_CLOUD
            // requires Xamarin Test Cloud Agent
            Xamarin.Calabash.Start();
#endif
            Microsoft.WindowsAzure.MobileServices.CurrentPlatform.Init();
            Microsoft.WindowsAzure.MobileServices.CurrentPlatform.Init();
            global::Xamarin.Forms.Forms.Init();
            ImageCircleRenderer.Init();
            LoadApplication(new App());

            KeyboardOverlapRenderer.Init();

            return(base.FinishedLaunching(app, options));
        }
Пример #20
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            Popup.Init();

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

            App.DisplayScreenWidth  = (float)UIScreen.MainScreen.Bounds.Width;
            App.DisplayScreenHeight = (float)UIScreen.MainScreen.Bounds.Height;
            App.DisplayScaleFactor  = (float)UIScreen.MainScreen.Scale;

            KeyboardOverlapRenderer.Init();

            LoadApplication(new App());

            UIApplication.SharedApplication.SetStatusBarHidden(true, true);
            UIApplication.SharedApplication.StatusBarHidden = true;

            return(base.FinishedLaunching(app, options));
        }
Пример #21
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            var renderer = new Syncfusion.SfAutoComplete.XForms.iOS.SfAutoCompleteRenderer();

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

            SegmentedControlRenderer.Init();
            CarouselViewRenderer.Init();

            KeyboardOverlapRenderer.Init();

            AnimationViewRenderer.Init();

            Xamarin.FormsGoogleMaps.Init("AIzaSyCxXBNtq5ksFXZJBwW_SRkf3gEMOg4YhPc");

            TintedImageRenderer.Init();

            App.ScreenHeight = UIScreen.MainScreen.Bounds.Height;
            App.ScreenWidth  = UIScreen.MainScreen.Bounds.Width;

            //BlobCache.ApplicationName = "Voltaire";

            // Code for starting up the Xamarin Test Cloud Agent
#if DEBUG
            Xamarin.Calabash.Start();
#else
            AppCenter.Start("3d0ef256-3c90-4860-b789-63ff7e930523",
                            typeof(Distribute), typeof(Analytics), typeof(Crashes));
            Distribute.DontCheckForUpdatesInDebug();
#endif
            SfListViewRenderer.Init();
            LoadApplication(new App());

            SfPdfDocumentViewRenderer.Init();

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

            UIApplication.SharedApplication.StatusBarHidden = false;

            return(result);
        }
Пример #22
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();

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

            Control.Init();
            KeyboardOverlapRenderer.Init();
            CachedImageRenderer.Init();
            //CachedImageRenderer.InitImageSourceHandler();

            LoadApplication(new App());

            if (UIDevice.CurrentDevice.CheckSystemVersion(10, 0))
            {
                // Request Permissions
                UNUserNotificationCenter.Current.RequestAuthorization(UNAuthorizationOptions.Alert | UNAuthorizationOptions.Badge | UNAuthorizationOptions.Sound, (granted, error) =>
                {
                    // Do something if needed
                });
            }
            else if (UIDevice.CurrentDevice.CheckSystemVersion(8, 0))
            {
                var notificationSettings = UIUserNotificationSettings.GetSettingsForTypes(
                    UIUserNotificationType.Alert | UIUserNotificationType.Badge | UIUserNotificationType.Sound, null
                    );
                app.RegisterUserNotificationSettings(notificationSettings);
            }

            var task = FirebasePushNotificationManager.Initialize(options);

            //FirebasePushNotificationManager.CurrentNotificationPresentationOption = UNNotificationPresentationOptions.Alert;

            return(base.FinishedLaunching(app, options));
        }
Пример #23
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)
        {
            global::Xamarin.Forms.Forms.Init();
            ImageCircleRenderer.Init();

            var statusBar = UIApplication.SharedApplication.ValueForKey(new NSString("statusBar")) as UIView;

            if (statusBar.RespondsToSelector(new ObjCRuntime.Selector("setBackgroundColor:")))
            {
                statusBar.BackgroundColor = UIColor.FromRGB(251, 67, 60);
                statusBar.TintColor       = UIColor.White;
            }
            LoadApplication(new App());
            TintedImageRenderer.Init();
            CachedImageRenderer.Init();
            RoundedBoxViewRenderer.Init();
            CarouselViewRenderer.Init();
            KeyboardOverlapRenderer.Init();

            OneSignal.Current.StartInit("84ec0128-74a1-40f9-89b1-35e35da35acd")
            .EndInit();

            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)
        {
            // BLE service must be instantiated from proper platform
            BluetoothManager bluetoothManager = BluetoothManager.Instance;
            IBluetoothLE     bluetoothLE      = CrossBluetoothLE.Current;

            bluetoothLE.Adapter.ScanMode = ScanMode.Balanced;
            bluetoothManager.BluetoothLE = bluetoothLE;

            Microsoft.WindowsAzure.MobileServices.CurrentPlatform.Init();
            SQLitePCL.CurrentPlatform.Init();
            KeyboardOverlapRenderer.Init();

            DependencyService.Register <BabyationApp.Interfaces.IPictureCache, BabyationApp.iOS.Dependencies.PictureCache>();
            DependencyService.Register <BabyationApp.Interfaces.IPlatformAPI, BabyationApp.iOS.Dependencies.PlatformAPI>();
            DependencyService.Register <BabyationApp.Interfaces.ILocalNotificationService, BabyationApp.iOS.Dependencies.LocalNotificationService>();

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

            var config = new FFImageLoading.Config.Configuration()
            {
                VerboseLogging            = true,
                VerbosePerformanceLogging = true,
                Logger = new CustomMiniLogger(),
            };

            ImageService.Instance.Initialize(config);
            FFImageLoading.Forms.Platform.CachedImageRenderer.Init();
            Rg.Plugins.Popup.Popup.Init();

            LoginManager loginInstance = LoginManager.Instance;

            loginInstance.Init(this);

            ScheduleManager.Instance.Initialize();
            RequestNotificationPermission();

            App myapp = new App();

            LoadApplication(myapp);

            // check for a notification

            /*
             * if (options != null)
             * {
             *  // check for a local notification
             *  if (options.ContainsKey(UIApplication.LaunchOptionsLocalNotificationKey))
             *  {
             *      if (options[UIApplication.LaunchOptionsLocalNotificationKey] is UILocalNotification localNotification)
             *      {
             *          UIAlertController okayAlertController = UIAlertController.Create(localNotification.AlertAction,
             *                                                                           localNotification.AlertBody,
             *                                                                           UIAlertControllerStyle.Alert);
             *
             *          okayAlertController.AddAction(UIAlertAction.Create("OK", UIAlertActionStyle.Default, null));
             *
             *          Window.RootViewController.PresentViewController(okayAlertController, true, null);
             *
             *          // reset our badge
             *          UIApplication.SharedApplication.ApplicationIconBadgeNumber = 0;
             *      }
             *  }
             * }
             */

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

            myapp.AfterStart();
            return(result);
        }
Пример #25
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            XfxControls.Init();
            ButtonCircle.FormsPlugin.iOS.ButtonCircleRenderer.Init();

            UINavigationBar.Appearance.TintColor = Color.White.ToUIColor();

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

            Firebase.Core.App.Configure();

            KeyboardOverlapRenderer.Init();

            DependencyService.Register <ToastNotification>(); // Register your dependency
            ToastNotification.Init();

            FFImageLoading.Forms.Touch.CachedImageRenderer.Init();

            var ignore = new CircleTransformation();

            //CarouselViewRenderer.Init();

            DependencyService.Register <IGoogleManager, GoogleManager>();
            DependencyService.Register <IFacebookManager, FacebookManager>();

            var googleServiceDictionary = NSDictionary.FromFile("GoogleService-Info.plist");

            SignIn.SharedInstance.ClientID = googleServiceDictionary["CLIENT_ID"].ToString();

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

            LoadApplication(new App());

            //var statusBar = UIApplication.SharedApplication.ValueForKey(new NSString("statusBar")) as UIView;
            //if (statusBar.RespondsToSelector(new ObjCRuntime.Selector("setBackgroundColor:")))
            //{
            //    statusBar.BackgroundColor = UIColor.White;
            //    statusBar.TintColor = UIColor.White;
            //}

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

            //FirebasePushNotificationManager.Initialize(options, new NotificationUserCategory[]
            //{
            //    new NotificationUserCategory("message",new List<NotificationUserAction> {
            //        new NotificationUserAction("Reply","Reply",NotificationActionType.Foreground)
            //    }),
            //    new NotificationUserCategory("request",new List<NotificationUserAction> {
            //        new NotificationUserAction("Accept","Accept"),
            //        new NotificationUserAction("Reject","Reject",NotificationActionType.Destructive)
            //    })

            //});

            // Register your app for remote notifications.
            if (UIDevice.CurrentDevice.CheckSystemVersion(10, 0))
            {
                // iOS 10 or later
                var authOptions = UNAuthorizationOptions.Alert | UNAuthorizationOptions.Badge | UNAuthorizationOptions.Sound;
                UNUserNotificationCenter.Current.RequestAuthorization(authOptions, (granted, error) => {
                    Console.WriteLine(granted);
                });

                // For iOS 10 display notification (sent via APNS)
                UNUserNotificationCenter.Current.Delegate = this;

                // For iOS 10 data message (sent via FCM)

                Messaging.SharedInstance.RemoteMessageDelegate = this;
            }
            else
            {
                // iOS 9 or before
                var allNotificationTypes = UIUserNotificationType.Alert | UIUserNotificationType.Badge | UIUserNotificationType.Sound;
                var settings             = UIUserNotificationSettings.GetSettingsForTypes(allNotificationTypes, null);
                UIApplication.SharedApplication.RegisterUserNotificationSettings(settings);
            }

            UIApplication.SharedApplication.RegisterForRemoteNotifications();

            return(base.FinishedLaunching(app, options));
        }
Пример #26
0
 public override bool FinishedLaunching(UIApplication uiApplication, NSDictionary launchOptions)
 {
     KeyboardOverlapRenderer.Init();
     return(base.FinishedLaunching(uiApplication, launchOptions));
 }