Beispiel #1
0
        public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
        {
            // create a new window instance based on the screen size
            Window = new UIWindow(UIScreen.MainScreen.Bounds);

            // If you have defined a root view controller, set it here:
            // Window.RootViewController = myViewController;

            Stripe.StripeClient.DefaultPublishableKey = AppConstants.StripeAPIKey;

            MapServices.ProvideAPIKey("AIzaSyAiBwRUm_KZDv_sp3eI7F8hxkePqDTvY20");

            presenter = IsPad ? (IMvxTouchViewPresenter) new PadPresenter(this, Window) : (IMvxTouchViewPresenter) new PhonePresenter(this, Window);

            var setup = new Setup(this, presenter);

            setup.Initialize();

            //get last used language
            var language = NSUserDefaults.StandardUserDefaults.StringForKey(AppConstants.Language);

            if (string.IsNullOrEmpty(language))
            {
                Mvx.Resolve <IMvxTextProviderBuilder>().LoadResources(string.Empty);
            }
            else
            {
                Mvx.Resolve <IMvxTextProviderBuilder>().LoadResources(language);
            }

            var startup = Mvx.Resolve <IMvxAppStart>();

            startup.Start();

            // make the window visible
            Window.MakeKeyAndVisible();

            //customize navigation bar
            UINavigationBar.Appearance.BarTintColor        = UIColor.FromRGB(35, 137, 203);
            UINavigationBar.Appearance.TintColor           = UIColor.White;
            UINavigationBar.Appearance.TitleTextAttributes = new UIStringAttributes(new NSDictionary(UIStringAttributeKey.ForegroundColor, UIColor.White));
            UIApplication.SharedApplication.SetStatusBarStyle(UIStatusBarStyle.LightContent, false);


            //customize tab bar
            var textAttributes = new UITextAttributes();

            textAttributes.Font = UIFont.FromName("HelveticaNeue-Bold", 17f);
            textAttributes.Font = FontHelper.AdjustFontSize(textAttributes.Font);
            UITabBarItem.Appearance.SetTitleTextAttributes(textAttributes, UIControlState.Normal);

            //initialize Crittercism
            #if DEBUG
            #else
            Crittercism.Init("55fcbf338d4d8c0a00d07a12");
            #endif


            return(true);
        }
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            MapServices.ProvideAPIKey("AIzaSyApVhhHzhJF59Qbp3SWmyVaGtKVvx3lhqU");



            UINavigationBar.Appearance.BarTintColor = UIColor.FromRGB(43, 132, 211); //bar background
            UINavigationBar.Appearance.TintColor    = UIColor.White;                 //Tint color of button items
            UINavigationBar.Appearance.SetTitleTextAttributes(new UITextAttributes()
            {
                Font      = UIFont.FromName("HelveticaNeue-Light", (nfloat)20f),
                TextColor = UIColor.White
            });
            global::Xamarin.Forms.Forms.Init();

            Xamarin.FormsMaps.Init();


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


            LoadApplication(new App());

            return(base.FinishedLaunching(app, options));
        }
Beispiel #3
0
        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

            if (string.IsNullOrWhiteSpace(GoogleApiKey.Key))
            {
                var message = $"Configure the Key property inside GoogleApiKey class for your bundle {NSBundle.MainBundle.BundleIdentifier}";
                ShowMessage("Google API Key is missing...", message, Window.RootViewController);
            }

            // Provide the Places API with your API key.
            PlacesClient.ProvideApiKey(GoogleApiKey.Key);

            // Provide the Maps API with your API key. You may not need
            // this in your app, however we do need this for the demo
            // app as it uses Maps.
            MapServices.ProvideAPIKey(GoogleApiKey.Key);

            var splitViewController = UIStoryboard.FromName("Main", null).InstantiateViewController(nameof(UISplitViewController)) as UISplitViewController;

            splitViewController.Delegate             = this;
            splitViewController.PreferredDisplayMode = UISplitViewControllerDisplayMode.PrimaryOverlay;

            Window = new UIWindow(UIScreen.MainScreen.Bounds)
            {
                RootViewController = splitViewController
            };
            Window.MakeKeyAndVisible();

            return(true);
        }
        public 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

            MapServices.ProvideAPIKey("AIzaSyAZQBaY-ugQuwCWr4NkD-bybK7urElvNyY");
            PlacesClient.ProvideApiKey("AIzaSyAZQBaY-ugQuwCWr4NkD-bybK7urElvNyY");

            Firebase.Core.App.Configure();
            Firebase.Database.Database.DefaultInstance.PersistenceEnabled = false;

            // Decide First Screen
            Window = new UIWindow(UIScreen.MainScreen.Bounds);
            var storyBoard = UIStoryboard.FromName("Main", null);

            if (Auth.DefaultInstance.CurrentUser != null)
            {
                var mainViewController = storyBoard.InstantiateViewController("MainViewController") as MainViewController;
                this.SetWindow(Window);
                Window.RootViewController = mainViewController;
            }
            else
            {
                var loginViewController = storyBoard.InstantiateViewController("LoginViewController") as LoginViewController;
                this.SetWindow(Window);
                Window.RootViewController = loginViewController;
            }

            return(true);
        }
Beispiel #5
0
        public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
        {
            // create a new window instance based on the screen size
            Window = new UIWindow(UIScreen.MainScreen.Bounds);
            UIStoryboard sb = UIStoryboard.FromName("Main", null);

            // If you have defined a root view controller, set it here:
            Window.RootViewController = sb.InstantiateInitialViewController();

            MapServices.ProvideAPIKey(GeneralConstants.MapsApiKey);
            // make the window visible
            Window.MakeKeyAndVisible();

            PushNotificationManager pushmanager = PushNotificationManager.PushManager;

            pushmanager.Delegate = this;
            UNUserNotificationCenter.Current.Delegate = pushmanager.notificationCenterDelegate;

            if (launchOptions != null)
            {
                if (launchOptions.ContainsKey(UIApplication.LaunchOptionsRemoteNotificationKey))
                {
                    pushmanager.HandlePushReceived(launchOptions);
                }
            }

            pushmanager.RegisterForPushNotifications();

            return(true);
        }
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            MapServices.ProvideAPIKey(MapsApiKey);
            // MVVM Light's DispatcherHelper for cross-thread handling.
            DispatcherHelper.Initialize(app);

            // Illustrates how to use the Messenger by receiving a message
            // and sending a message back.
            Messenger.Default.Register <NotificationMessageAction <string> >(
                this,
                HandleNotificationMessage);

            // Configure and register the MVVM Light NavigationService
            var nav = new NavigationService();

            SimpleIoc.Default.Register <INavigationService>(() => nav);

            nav.Initialize((UINavigationController)Window.RootViewController);
            nav.Configure(ViewModelLocator.SecondPageKey, "SecondPage");

            // Register the MVVM Light DialogService
            SimpleIoc.Default.Register <IDialogService, DialogService>();

            return(true);
        }
Beispiel #7
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            // Activate TestFlight
            MonoTouch.TestFlight.TestFlight.TakeOffThreadSafe(@"d8fc2051-04bd-4612-b83f-19786b749aab");

            // Activate Vernacular Catalog
            Catalog.Implementation = new ResourceCatalog {
                GetResourceById = id => {
                    var resource = NSBundle.MainBundle.LocalizedString(id, null);
                    return(resource == id ? null : resource);
                },
            };

            //			System.Threading.Thread.CurrentThread.CurrentUICulture = new CultureInfo("de-DE");
            observerSettings = NSNotificationCenter.DefaultCenter.AddObserver((NSString)"NSUserDefaultsDidChangeNotification", DefaultsChanged);
            DefaultsChanged(null);

            // Set Google Maps API Key
            MapServices.ProvideAPIKey(MapsApiKey);

            // create a new window instance based on the screen size
            window = new UIWindow(UIScreen.MainScreen.Bounds);

            // Set default color for NavigationButtons
            UIBarButtonItem.Appearance.TintColor = Colors.NavBarButton;

            // Create NavigationControlls
            navCartSelect = new UINavigationController();

            // Set color of NavigationBar and NavigationButtons (TintColor)
            // OS specific details
            if (new Version(UIDevice.CurrentDevice.SystemVersion) >= new Version(7, 0))
            {
                navCartSelect.NavigationBar.SetBackgroundImage(Images.BlueTop, UIBarMetrics.Default);
            }
            else
            {
                navCartSelect.NavigationBar.SetBackgroundImage(Images.Blue, UIBarMetrics.Default);
            }

            navCartSelect.NavigationBar.TintColor = Colors.NavBarButton;

            // Now create list for cartridges
            viewCartSelect = new CartridgeList(this);

            // Add the cartridge view to the navigation controller
            // (it'll be the top most screen)
            navCartSelect.PushViewController((UIViewController)viewCartSelect, false);

            // Set the root view controller on the window. The nav
            // controller will handle the rest
            // If you have defined a view, add it here:
            // window.AddSubview (navigationController.View);
            window.RootViewController = navCartSelect;

            // make the window visible
            window.MakeKeyAndVisible();

            return(true);
        }
Beispiel #8
0
 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
     MapServices.ProvideAPIKey(MapsApiKey);
     return(true);
 }
Beispiel #9
0
        public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
        {
            Window = new UIWindow(UIScreen.MainScreen.Bounds)
            {
                RootViewController = new UINavigationController()
            };
            Window.MakeKeyAndVisible();

            Forms.Init();
            MapServices.ProvideAPIKey(GoogleMapsApi.iOSSdkKey);

            new iOSLocator()
            .Build()
            .Resolve <INavigationService>()
            .NavigateTo <MainViewModel>();

            iOSAutoMapperConfiguration.Configure();

            UINavigationBar.Appearance.BarTintColor = UIColor.White;
            UINavigationBar.Appearance.Translucent  = false;
            UINavigationBar.Appearance.ShadowImage  = new UIImage();
            UINavigationBar.Appearance.SetBackgroundImage(new UIImage(), UIBarMetrics.Default);

            return(true);
        }
 public static void Init(string apiKey, PlatformConfig config = null)
 {
     MapServices.ProvideAPIKey(apiKey);
     GeocoderBackend.Register();
     MapRenderer.Config = config ?? new PlatformConfig();
     IsInitialized      = true;
 }
Beispiel #11
0
        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
            MapServices.ProvideAPIKey("AIzaSyCHIWF8_OR-RIIa99Yv7aJHBg-0_vICmac");

            return(true);
        }
Beispiel #12
0
 public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
 {
     new DataBase();
     MapServices.ProvideAPIKey(MapsApiKey);
     Xamarin.Auth.Presenters.XamarinIOS.AuthenticationConfiguration.Init();
     //var googleServiceDictionary = NSDictionary.FromFile("GoogleService-Info.plist");
     //SignIn.SharedInstance.ClientID = googleServiceDictionary["CLIENT_ID"].ToString();
     return(true);
 }
        //
        // 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)
        {
            MapServices.ProvideAPIKey("AIzaSyA8iECZ9g4RhtED_Mn5XX_fUS0w0CvnAug");

            global::Xamarin.Forms.Forms.Init();
            LoadApplication(new App());

            return(base.FinishedLaunching(app, options));
        }
Beispiel #14
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            MapServices.ProvideAPIKey(kMapsApiKey);
            global::Xamarin.Forms.Forms.Init();
            ImageCircleRenderer.Init();
            LoadApplication(new App());

            return(base.FinishedLaunching(app, options));
        }
Beispiel #15
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            MapServices.ProvideAPIKey("AIzaSyBeuJPP0QNaKxGZlLoHnaT9QCn5hEsTHb8");

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

            LoadApplication(new App());

            return(base.FinishedLaunching(app, options));
        }
Beispiel #16
0
        public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
        {
                        #if ENABLE_TEST_CLOUD
            Xamarin.Calabash.Start();
                        #endif

            MapServices.ProvideAPIKey(PortableLibrary.Constants.GOOGLE_MAP_API_KEY);

            return(true);
        }
Beispiel #17
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 apikey = "YOUR-API-KEY-HERE";

            PlacesClient.ProvideApiKey(apikey);
            MapServices.ProvideAPIKey(apikey);
            global::Xamarin.Forms.Forms.Init();
            LoadApplication(new App());

            return(base.FinishedLaunching(app, options));
        }
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            MapServices.ProvideAPIKey(MapsApiKey);

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

            LoadApplication(new ScnDiscounts.App());

            return(base.FinishedLaunching(app, options));
        }
Beispiel #19
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            MapServices.ProvideAPIKey("your-api-key");

            window = new UIWindow(UIScreen.MainScreen.Bounds)
            {
                RootViewController = new MapViewController()
            };
            window.MakeKeyAndVisible();

            return(true);
        }
Beispiel #20
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            MapServices.ProvideAPIKey("AIzaSyDoMGciKq9fjSpc2KxIh5HFlY_dW6rfue4");

            window = new UIWindow(UIScreen.MainScreen.Bounds)
            {
                RootViewController = new MapViewController()
            };
            window.MakeKeyAndVisible();

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

            MapServices.ProvideAPIKey("YOUR_API_KEY_HERE");

            LoadApplication(new App());



            return(base.FinishedLaunching(app, options));
        }
Beispiel #22
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            MapServices.ProvideAPIKey("AIzaSyDSW0_HYb66rdpwW6hhV7Idhe3tjUqmTTI");

            window = new UIWindow(UIScreen.MainScreen.Bounds)
            {
                RootViewController = new MapViewController()
            };
            window.MakeKeyAndVisible();

            return(true);
        }
Beispiel #23
0
        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
            MapServices.ProvideAPIKey(AppSettings.GoogleMapsAPIKey);
            return(true);
        }
Beispiel #24
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)
        {
            NativeCSS.StyleWithCSS(".menu-table{color:#0b93ff}");
            MapServices.ProvideAPIKey(GoogleMapsAPI);
            window = new UIWindow(UIScreen.MainScreen.Bounds);
            var rootNavigationController = new MainViewController();

            window.RootViewController = rootNavigationController;
            window.MakeKeyAndVisible();

            return(true);
        }
Beispiel #25
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            MapServices.ProvideAPIKey("<Get your Api Key at https://code.google.com/apis/console/>");

            window = new UIWindow(UIScreen.MainScreen.Bounds)
            {
                RootViewController = new MapViewController()
            };
            window.MakeKeyAndVisible();

            return(true);
        }
Beispiel #26
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)
        {
            MapServices.ProvideAPIKey(MapsApiKey);

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

            dvc                       = new DVCMenu();
            navController             = new UINavigationController(dvc);
            window.RootViewController = navController;
            window.MakeKeyAndVisible();

            return(true);
        }
Beispiel #27
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            _window = new UIWindow(UIScreen.MainScreen.Bounds);

            _viewController            = new MyViewController();
            _window.RootViewController = _viewController;

            MapServices.ProvideAPIKey(ApiKey);

            _window.MakeKeyAndVisible();

            return(true);
        }
Beispiel #28
0
        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
            MapServices.ProvideAPIKey(MapsApiKey);

            // ensure that LocationManager ready to go before anything needs it to avoid location update event problems
            // Note that this creates the static object that is kept in memory
            _locationManager = SingletonManager.LocationManager;


            return(true);
        }
Beispiel #29
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            var apikey = "AIzaSyC-HHfSqamKxBaPtm7Rk0FY1TRGiWHguBQ";

            PlacesClient.ProvideApiKey(apikey);
            MapServices.ProvideAPIKey(apikey);
            Microsoft.WindowsAzure.MobileServices.CurrentPlatform.Init();
            global::Xamarin.Forms.Forms.Init();

            LoadApplication(new App());

            return(base.FinishedLaunching(app, options));
        }
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            window = new UIWindow(UIScreen.MainScreen.Bounds);

            _RootVC = new SqliteTableDemoViewController(DemoDatabase);
            _Nav    = new UINavigationController(_RootVC);
            window.RootViewController = _Nav;
            window.MakeKeyAndVisible();

            MapServices.ProvideAPIKey(MapsApiKey);

            return(true);
        }