protected override void OnCreate(Bundle bundle) { TabLayoutResource = Resource.Layout.Tabbar; ToolbarResource = Resource.Layout.Toolbar; base.OnCreate(bundle); HapticFeedbackService.Init(this); global::Xamarin.Forms.Forms.Init(this, bundle); //var app = new NyApplicationBuilder<App>() // //.UseServiceProviderFactory() // .UseServiceProviderFactory(new AutofacServiceProviderFactory()) // .ConfigureContainer<ContainerBuilder>((appctx, builder) => // { // builder.Register<string>(x => "teste"); // // registering services in the Autofac ContainerBuilder // }) // .Build(); //var a = app.Services.GetService(typeof(string)); //app.Run(this); LoadApplication(new App()); //Dont need cause app.Run(this); already do this }
// 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(); HapticFeedbackService.Init(); //var b = new NyApplicationBuilder<App>() // .ConfigureServices(ConfigureServices) // .Build(); //b.Run(this); LoadApplication(new App()); //Dont need cause app.Run(this); already do this return(base.FinishedLaunching(app, options)); }