mirror of
https://github.com/bitwarden/mobile
synced 2025-12-31 23:53:25 +00:00
PM-3350 iOS applied workaround on the iOS Autofill and Share extension to maui embed the navigation page with its content page in the Window
This commit is contained in:
@@ -16,8 +16,8 @@ namespace Bit.iOS.Core.Handlers
|
||||
protected override UIWindow CreatePlatformElement()
|
||||
{
|
||||
// Haven't tested
|
||||
return UIApplication.SharedApplication.Delegate.GetWindow();
|
||||
//return Platform.GetCurrentUIViewController().View.Window;
|
||||
//return UIApplication.SharedApplication.Delegate.GetWindow();
|
||||
return Platform.GetCurrentUIViewController().View.Window;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace Bit.iOS.Core.Utilities
|
||||
})
|
||||
.UseMauiEmbedding<Application>();
|
||||
// Register the Window
|
||||
builder.Services.Add(new ServiceDescriptor(typeof(UIWindow), UIApplication.SharedApplication.KeyWindow));
|
||||
builder.Services.Add(new ServiceDescriptor(typeof(UIWindow), _ => UIApplication.SharedApplication.KeyWindow, ServiceLifetime.Singleton));
|
||||
var mauiApp = builder.Build();
|
||||
|
||||
MauiContextSingleton.Instance.Init(new MauiContext(mauiApp.Services));
|
||||
|
||||
Reference in New Issue
Block a user