// // 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.Forms.SetFlags("Brush_Experimental"); global::Xamarin.Forms.Forms.Init(); ZXing.Net.Mobile.Forms.iOS.Platform.Init(); var formsApp = new BlazorApp(fileProvider: null, ConfigureDi); var serviceProvider = formsApp.ServiceProvider; MessagingCenter.Subscribe <InitializeNoWalletTaskMessage>(this, "InitializeNoWalletTaskMessage", async message => { var context = new iOSInitializeNoWalletContext(serviceProvider.GetService <Global>()); await context.InitializeNoWallet(); }); MessagingCenter.Subscribe <OnSleepingTaskMessage>(this, "OnSleepingTaskMessage", async message => { var context = new iOSOnSleepingContext(serviceProvider.GetService <Global>()); await context.OnSleeping(); }); formsApp.InitializeNoWallet(); UNUserNotificationCenter.Current.Delegate = formsApp.ServiceProvider.GetService <iOSNotificationReceiver>(); LoadApplication(formsApp); return(base.FinishedLaunching(app, options)); }
public static void AddBlazorApp(this ICollection <CmsPageContent> allContent, BlazorApp app, string contentPageHolderId = "Body") { var cmsPageContent = new InstallationHelpers().BuildCmsPageContentFromToolboxItemTemplate(app); cmsPageContent.PlacementContentPlaceHolderId = contentPageHolderId; allContent.Add(cmsPageContent); }