// // 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.Forms.DependencyService.Register<XLabs.Platform.Services.Geolocation.Geolocator> (); var container = new XLabs.Ioc.SimpleContainer (); container.Register<XLabs.Platform.Device.IDevice> (t => XLabs.Platform.Device.AppleDevice.CurrentDevice); XLabs.Ioc.Resolver.SetResolver (container.GetResolver ()); global::Xamarin.Forms.Forms.Init(); global::Xamarin.FormsMaps.Init(); global::Microsoft.WindowsAzure.MobileServices.CurrentPlatform.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) { Xamarin.Forms.DependencyService.Register <XLabs.Platform.Services.Geolocation.Geolocator> (); var container = new XLabs.Ioc.SimpleContainer(); container.Register <XLabs.Platform.Device.IDevice> (t => XLabs.Platform.Device.AppleDevice.CurrentDevice); XLabs.Ioc.Resolver.SetResolver(container.GetResolver()); global::Xamarin.Forms.Forms.Init(); global::Xamarin.FormsMaps.Init(); global::Microsoft.WindowsAzure.MobileServices.CurrentPlatform.Init(); LoadApplication(new App()); return(base.FinishedLaunching(app, options)); }
protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); Xamarin.Forms.DependencyService.Register<XLabs.Platform.Services.Geolocation.Geolocator> (); //Xamarin.Forms.DependencyService.Register<XLabs.Platform.Device.AndroidDevice> (); var container = new XLabs.Ioc.SimpleContainer (); container.Register<XLabs.Platform.Device.IDevice, XLabs.Platform.Device.AndroidDevice> (); XLabs.Ioc.Resolver.SetResolver (container.GetResolver ()); global::Xamarin.Forms.Forms.Init(this, bundle); global::Xamarin.FormsMaps.Init(this, bundle); global::Microsoft.WindowsAzure.MobileServices.CurrentPlatform.Init (); LoadApplication(new App()); }
protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); Xamarin.Forms.DependencyService.Register <XLabs.Platform.Services.Geolocation.Geolocator> (); //Xamarin.Forms.DependencyService.Register<XLabs.Platform.Device.AndroidDevice> (); var container = new XLabs.Ioc.SimpleContainer(); container.Register <XLabs.Platform.Device.IDevice, XLabs.Platform.Device.AndroidDevice> (); XLabs.Ioc.Resolver.SetResolver(container.GetResolver()); global::Xamarin.Forms.Forms.Init(this, bundle); global::Xamarin.FormsMaps.Init(this, bundle); global::Microsoft.WindowsAzure.MobileServices.CurrentPlatform.Init(); LoadApplication(new App()); }
public override bool FinishedLaunching(UIApplication app, NSDictionary options) { var resolverContainer = new XLabs.Ioc.SimpleContainer(); resolverContainer.Register(t => AppleDevice.CurrentDevice) .Register(t => t.Resolve <IDevice>().Display) .Register <IMediaPicker, MediaPicker>() .Register <XLabs.Ioc.IDependencyContainer>(t => resolverContainer) .Register <IJsonSerializer, IJsonSerializer>(); XLabs.Ioc.Resolver.SetResolver(resolverContainer.GetResolver()); Forms.Init(); Xamarin.FormsMaps.Init();//карты var a = CLAuthorizationStatus.Authorized; DependencyService.Register <ToastNotificatorImplementation>(); ToastNotificatorImplementation.Init(); var dummy = new TKCustomMapRenderer(); var dummy2 = new NativePlacesApi(); LoadApplication(new App()); return(base.FinishedLaunching(app, options)); }