mirror of
https://github.com/bitwarden/android.git
synced 2024-12-27 11:28:28 +03:00
PM-3350 iOS extensions TapGestureRecognizer try Window workaround
This commit is contained in:
parent
bfa2a51608
commit
a5804df6a3
8 changed files with 174 additions and 78 deletions
|
@ -29,6 +29,8 @@
|
|||
|
||||
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">11.0</SupportedOSPlatformVersion>
|
||||
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">21.0</SupportedOSPlatformVersion>
|
||||
|
||||
<ForceSimulatorX64ArchitectureInIDE>true</ForceSimulatorX64ArchitectureInIDE>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<DefineConstants Condition=" '$(CustomConstants)' != '' ">$(DefineConstants);$(CustomConstants)</DefineConstants>
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
using Bit.App.Utilities;
|
||||
using Bit.Core.Abstractions;
|
||||
using Bit.Core.Utilities;
|
||||
using Microsoft.Maui.Platform;
|
||||
|
||||
namespace Bit.App.Pages
|
||||
{
|
||||
|
@ -78,6 +79,20 @@ namespace Bit.App.Pages
|
|||
}
|
||||
}
|
||||
|
||||
//protected override void OnHandlerChanged()
|
||||
//{
|
||||
// base.OnHandlerChanged();
|
||||
|
||||
// if (!_appOptions.IosExtension)
|
||||
// {
|
||||
// return;
|
||||
// }
|
||||
|
||||
// var window = new Window();
|
||||
// window.ToHandler(this.Handler.MauiContext);
|
||||
// window.Page = this;
|
||||
//}
|
||||
|
||||
protected override void OnNavigatingFrom(NavigatingFromEventArgs args)
|
||||
{
|
||||
base.OnNavigatingFrom(args);
|
||||
|
|
|
@ -72,7 +72,7 @@ namespace Bit.Core.Services
|
|||
var urls = await _stateService.GetEnvironmentUrlsAsync();
|
||||
urls ??= await _stateService.GetPreAuthEnvironmentUrlsAsync();
|
||||
|
||||
if (urls == null || urls.IsEmpty)
|
||||
if (urls == null || urls.IsEmpty || region is null)
|
||||
{
|
||||
await SetRegionAsync(BwRegion.US);
|
||||
_conditionedAwaiterManager.SetAsCompleted(AwaiterPrecondition.EnvironmentUrlsInited);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using AuthenticationServices;
|
||||
using Bit.App.Abstractions;
|
||||
|
@ -22,6 +22,30 @@ using UIKit;
|
|||
|
||||
namespace Bit.iOS.Autofill
|
||||
{
|
||||
public partial class NavigationPageFix : NavigationPage
|
||||
{
|
||||
public NavigationPageFix()
|
||||
{
|
||||
}
|
||||
|
||||
public NavigationPageFix(Page root) : base(root)
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnHandlerChanged()
|
||||
{
|
||||
base.OnHandlerChanged();
|
||||
|
||||
var window = new Window(this);
|
||||
|
||||
//window.Page = this;
|
||||
window.ToHandler(this.Handler.MauiContext);
|
||||
|
||||
//window.Page = this;
|
||||
//window.ToHandler(MauiContextSingleton.Instance.MauiContext);
|
||||
}
|
||||
}
|
||||
|
||||
public partial class CredentialProviderViewController : ASCredentialProviderViewController, IAccountsManagerHost
|
||||
{
|
||||
private Context _context;
|
||||
|
@ -140,8 +164,10 @@ namespace Bit.iOS.Autofill
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LoggerHelper.LogEvenIfCantBeResolved(ex);
|
||||
throw;
|
||||
UIPasteboard.General.String = ex.ToString();
|
||||
_labelErr.Text = ex.ToString();
|
||||
//LoggerHelper.LogEvenIfCantBeResolved(ex);
|
||||
//throw;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -407,6 +433,8 @@ namespace Bit.iOS.Autofill
|
|||
}
|
||||
|
||||
private void LaunchHomePage()
|
||||
{
|
||||
try
|
||||
{
|
||||
var appOptions = new AppOptions { IosExtension = true };
|
||||
var homePage = new HomePage(appOptions);
|
||||
|
@ -422,13 +450,19 @@ namespace Bit.iOS.Autofill
|
|||
vm.CloseAction = () => CompleteRequest();
|
||||
}
|
||||
|
||||
var navigationPage = new NavigationPage(homePage);
|
||||
var navigationPage = new NavigationPageFix(homePage);
|
||||
var loginController = navigationPage.ToUIViewController(MauiContextSingleton.Instance.MauiContext);
|
||||
loginController.ModalPresentationStyle = UIModalPresentationStyle.FullScreen;
|
||||
PresentViewController(loginController, true, null);
|
||||
|
||||
LogoutIfAuthed();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
UIPasteboard.General.String = ex.ToString();
|
||||
_labelErr.Text = ex.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
private void LaunchEnvironmentFlow()
|
||||
{
|
||||
|
@ -442,7 +476,7 @@ namespace Bit.iOS.Autofill
|
|||
vm.CloseAction = () => DismissViewController(false, () => LaunchHomePage());
|
||||
}
|
||||
|
||||
var navigationPage = new NavigationPage(environmentPage);
|
||||
var navigationPage = new NavigationPageFix(environmentPage);
|
||||
var loginController = navigationPage.ToUIViewController(MauiContextSingleton.Instance.MauiContext);
|
||||
loginController.ModalPresentationStyle = UIModalPresentationStyle.FullScreen;
|
||||
PresentViewController(loginController, true, null);
|
||||
|
@ -460,7 +494,7 @@ namespace Bit.iOS.Autofill
|
|||
vm.CloseAction = () => DismissViewController(false, () => LaunchHomePage());
|
||||
}
|
||||
|
||||
var navigationPage = new NavigationPage(registerPage);
|
||||
var navigationPage = new NavigationPageFix(registerPage);
|
||||
var loginController = navigationPage.ToUIViewController(MauiContextSingleton.Instance.MauiContext);
|
||||
loginController.ModalPresentationStyle = UIModalPresentationStyle.FullScreen;
|
||||
PresentViewController(loginController, true, null);
|
||||
|
@ -483,7 +517,7 @@ namespace Bit.iOS.Autofill
|
|||
vm.CloseAction = () => DismissViewController(false, () => LaunchHomePage());
|
||||
}
|
||||
|
||||
var navigationPage = new NavigationPage(loginPage);
|
||||
var navigationPage = new NavigationPageFix(loginPage);
|
||||
var loginController = navigationPage.ToUIViewController(MauiContextSingleton.Instance.MauiContext);
|
||||
loginController.ModalPresentationStyle = UIModalPresentationStyle.FullScreen;
|
||||
PresentViewController(loginController, true, null);
|
||||
|
@ -506,7 +540,7 @@ namespace Bit.iOS.Autofill
|
|||
vm.CloseAction = () => DismissViewController(false, () => LaunchHomePage());
|
||||
}
|
||||
|
||||
var navigationPage = new NavigationPage(loginWithDevicePage);
|
||||
var navigationPage = new NavigationPageFix(loginWithDevicePage);
|
||||
var loginController = navigationPage.ToUIViewController(MauiContextSingleton.Instance.MauiContext);
|
||||
loginController.ModalPresentationStyle = UIModalPresentationStyle.FullScreen;
|
||||
PresentViewController(loginController, true, null);
|
||||
|
@ -530,7 +564,7 @@ namespace Bit.iOS.Autofill
|
|||
vm.CloseAction = () => DismissViewController(false, () => LaunchHomePage());
|
||||
}
|
||||
|
||||
var navigationPage = new NavigationPage(loginPage);
|
||||
var navigationPage = new NavigationPageFix(loginPage);
|
||||
var loginController = navigationPage.ToUIViewController(MauiContextSingleton.Instance.MauiContext);
|
||||
loginController.ModalPresentationStyle = UIModalPresentationStyle.FullScreen;
|
||||
PresentViewController(loginController, true, null);
|
||||
|
@ -560,7 +594,7 @@ namespace Bit.iOS.Autofill
|
|||
vm.UpdateTempPasswordAction = () => DismissViewController(false, () => LaunchUpdateTempPasswordFlow());
|
||||
}
|
||||
|
||||
var navigationPage = new NavigationPage(twoFactorPage);
|
||||
var navigationPage = new NavigationPageFix(twoFactorPage);
|
||||
var twoFactorController = navigationPage.ToUIViewController(MauiContextSingleton.Instance.MauiContext);
|
||||
twoFactorController.ModalPresentationStyle = UIModalPresentationStyle.FullScreen;
|
||||
PresentViewController(twoFactorController, true, null);
|
||||
|
@ -579,7 +613,7 @@ namespace Bit.iOS.Autofill
|
|||
vm.CloseAction = () => DismissViewController(false, () => LaunchHomePage());
|
||||
}
|
||||
|
||||
var navigationPage = new NavigationPage(setPasswordPage);
|
||||
var navigationPage = new NavigationPageFix(setPasswordPage);
|
||||
var setPasswordController = navigationPage.ToUIViewController(MauiContextSingleton.Instance.MauiContext);
|
||||
setPasswordController.ModalPresentationStyle = UIModalPresentationStyle.FullScreen;
|
||||
PresentViewController(setPasswordController, true, null);
|
||||
|
@ -597,7 +631,7 @@ namespace Bit.iOS.Autofill
|
|||
vm.LogOutAction = () => DismissViewController(false, () => LaunchHomePage());
|
||||
}
|
||||
|
||||
var navigationPage = new NavigationPage(updateTempPasswordPage);
|
||||
var navigationPage = new NavigationPageFix(updateTempPasswordPage);
|
||||
var updateTempPasswordController = navigationPage.ToUIViewController(MauiContextSingleton.Instance.MauiContext);
|
||||
updateTempPasswordController.ModalPresentationStyle = UIModalPresentationStyle.FullScreen;
|
||||
PresentViewController(updateTempPasswordController, true, null);
|
||||
|
@ -616,7 +650,7 @@ namespace Bit.iOS.Autofill
|
|||
vm.LogInWithDeviceAction = () => DismissViewController(false, () => LaunchLoginWithDevice(AuthRequestType.AuthenticateAndUnlock, vm.Email, true));
|
||||
}
|
||||
|
||||
var navigationPage = new NavigationPage(loginApproveDevicePage);
|
||||
var navigationPage = new NavigationPageFix(loginApproveDevicePage);
|
||||
var loginApproveDeviceController = navigationPage.ToUIViewController(MauiContextSingleton.Instance.MauiContext);
|
||||
loginApproveDeviceController.ModalPresentationStyle = UIModalPresentationStyle.FullScreen;
|
||||
PresentViewController(loginApproveDeviceController, true, null);
|
||||
|
|
|
@ -1,19 +1,20 @@
|
|||
// WARNING
|
||||
//
|
||||
// This file has been generated automatically by Visual Studio from the outlets and
|
||||
// actions declared in your storyboard file.
|
||||
// Manual changes to this file will not be maintained.
|
||||
// This file has been generated automatically by Visual Studio to store outlets and
|
||||
// actions made in the UI designer. If it is removed, they will be lost.
|
||||
// Manual changes to this file may not be handled correctly.
|
||||
//
|
||||
using Foundation;
|
||||
using System;
|
||||
using System.CodeDom.Compiler;
|
||||
using UIKit;
|
||||
|
||||
namespace Bit.iOS.Autofill
|
||||
{
|
||||
[Register ("CredentialProviderViewController")]
|
||||
partial class CredentialProviderViewController
|
||||
{
|
||||
[Outlet]
|
||||
UIKit.UILabel _labelErr { get; set; }
|
||||
|
||||
[Outlet]
|
||||
[GeneratedCode ("iOS Designer", "1.0")]
|
||||
UIKit.UIImageView Logo { get; set; }
|
||||
|
@ -24,6 +25,11 @@ namespace Bit.iOS.Autofill
|
|||
Logo.Dispose ();
|
||||
Logo = null;
|
||||
}
|
||||
|
||||
if (_labelErr != null) {
|
||||
_labelErr.Dispose ();
|
||||
_labelErr = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,9 +1,9 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="20037" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="43">
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="22154" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="43">
|
||||
<device id="retina6_1" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="20020"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22130"/>
|
||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||
<capability name="System colors in document resources" minToolsVersion="11.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
|
@ -18,18 +18,28 @@
|
|||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<subviews>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" image="logo.png" translatesAutoresizingMaskIntoConstraints="NO" id="1713">
|
||||
<rect key="frame" x="66" y="396" width="282" height="44"/>
|
||||
<rect key="frame" x="66" y="676" width="282" height="44"/>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="No Error" textAlignment="natural" lineBreakMode="characterWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="HVp-Yu-JIZ">
|
||||
<rect key="frame" x="5" y="187" width="404" height="26.5"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="22"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<viewLayoutGuide key="safeArea" id="YG6-2d-qpF"/>
|
||||
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstItem="1713" firstAttribute="centerY" secondItem="44" secondAttribute="centerY" constant="-30" id="1763"/>
|
||||
<constraint firstItem="1713" firstAttribute="centerY" secondItem="44" secondAttribute="centerY" constant="250" id="1763"/>
|
||||
<constraint firstItem="1713" firstAttribute="centerX" secondItem="YG6-2d-qpF" secondAttribute="centerX" id="1764"/>
|
||||
<constraint firstItem="HVp-Yu-JIZ" firstAttribute="top" secondItem="YG6-2d-qpF" secondAttribute="top" constant="139" id="Ay0-v3-kTO"/>
|
||||
<constraint firstItem="HVp-Yu-JIZ" firstAttribute="trailing" secondItem="YG6-2d-qpF" secondAttribute="trailing" constant="-5" id="TdY-Cu-YFt"/>
|
||||
<constraint firstItem="YG6-2d-qpF" firstAttribute="leading" secondItem="HVp-Yu-JIZ" secondAttribute="leading" constant="-5" id="lfV-6C-INq"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<connections>
|
||||
<outlet property="Logo" destination="1713" id="name-outlet-1713"/>
|
||||
<outlet property="_labelErr" destination="HVp-Yu-JIZ" id="PjY-be-dhX"/>
|
||||
<segue destination="oCZ-GQ-aOK" kind="show" identifier="loginListSegue" id="1679"/>
|
||||
<segue destination="6855" kind="presentation" identifier="lockPasswordSegue" id="9874"/>
|
||||
<segue destination="10580" kind="presentation" identifier="setupSegue" modalTransitionStyle="coverVertical" id="11089"/>
|
||||
|
@ -68,7 +78,7 @@
|
|||
<objects>
|
||||
<navigationController definesPresentationContext="YES" id="1845" sceneMemberID="viewController">
|
||||
<navigationBar key="navigationBar" contentMode="scaleToFill" translucent="NO" id="1848">
|
||||
<rect key="frame" x="0.0" y="44" width="414" height="44"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
|
||||
<color key="barTintColor" red="0.23529411764705882" green="0.55294117647058827" blue="0.73725490196078436" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<textAttributes key="titleTextAttributes">
|
||||
|
@ -88,7 +98,7 @@
|
|||
<objects>
|
||||
<tableViewController id="2087" customClass="LoginAddViewController" sceneMemberID="viewController">
|
||||
<tableView key="view" opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="static" style="grouped" allowsSelection="NO" rowHeight="50" sectionHeaderHeight="22" sectionFooterHeight="22" id="2088">
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="808"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="852"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<color key="sectionIndexBackgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
|
@ -128,15 +138,15 @@
|
|||
<objects>
|
||||
<viewController id="2304" customClass="LoginListViewController" sceneMemberID="viewController">
|
||||
<view key="view" contentMode="scaleToFill" id="q9o-3n-3xL">
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="786"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="830"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<tableView opaque="NO" clipsSubviews="YES" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" translatesAutoresizingMaskIntoConstraints="NO" id="2305">
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="737"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="781"/>
|
||||
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
|
||||
<prototypes>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" textLabel="3763" detailTextLabel="3764" rowHeight="44" style="IBUITableViewCellStyleSubtitle" id="3761">
|
||||
<rect key="frame" x="0.0" y="44.5" width="414" height="44"/>
|
||||
<rect key="frame" x="0.0" y="50" width="414" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="3761" id="3762">
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="44"/>
|
||||
|
@ -166,7 +176,7 @@
|
|||
</connections>
|
||||
</tableView>
|
||||
<view userInteractionEnabled="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Tq0-Ep-tHr" userLabel="OverlayView">
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="737"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="781"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</view>
|
||||
</subviews>
|
||||
|
@ -236,7 +246,7 @@
|
|||
<objects>
|
||||
<navigationController definesPresentationContext="YES" id="4574" sceneMemberID="viewController">
|
||||
<navigationBar key="navigationBar" contentMode="scaleToFill" translucent="NO" id="4577">
|
||||
<rect key="frame" x="0.0" y="44" width="414" height="44"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
|
||||
<color key="tintColor" red="0.0" green="0.52549019607843139" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<color key="barTintColor" red="0.23529411764705882" green="0.55294117647058827" blue="0.73725490196078436" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
|
@ -257,11 +267,11 @@
|
|||
<objects>
|
||||
<viewController id="4576" customClass="PasswordGeneratorViewController" sceneMemberID="viewController">
|
||||
<view key="view" contentMode="scaleToFill" id="4930">
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="808"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="852"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<subviews>
|
||||
<containerView contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="4933">
|
||||
<rect key="frame" x="0.0" y="90.5" width="414" height="683.5"/>
|
||||
<rect key="frame" x="0.0" y="90.5" width="414" height="761.5"/>
|
||||
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<connections>
|
||||
<segue destination="4912" kind="embed" id="6480"/>
|
||||
|
@ -318,7 +328,7 @@
|
|||
<objects>
|
||||
<tableViewController id="4912" sceneMemberID="viewController">
|
||||
<tableView key="view" opaque="NO" clipsSubviews="YES" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="static" style="grouped" separatorStyle="default" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" id="4913">
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="683.5"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="761.5"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<connections>
|
||||
|
@ -357,15 +367,15 @@
|
|||
<objects>
|
||||
<viewController id="cn5-F4-59n" customClass="LockPasswordViewController" sceneMemberID="viewController">
|
||||
<view key="view" contentMode="scaleToFill" id="0qM-RN-J2i" userLabel="Main View">
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="786"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="830"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="grouped" separatorStyle="default" rowHeight="44" sectionHeaderHeight="18" sectionFooterHeight="18" translatesAutoresizingMaskIntoConstraints="NO" id="FcI-Ph-m9e">
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="786"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="830"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<prototypes>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" id="oQZ-wW-5uB">
|
||||
<rect key="frame" x="0.0" y="49.5" width="414" height="44"/>
|
||||
<rect key="frame" x="0.0" y="55.5" width="414" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="oQZ-wW-5uB" id="SUk-LD-cXo">
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="44"/>
|
||||
|
@ -373,7 +383,7 @@
|
|||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" id="1cB-yn-7ii">
|
||||
<rect key="frame" x="0.0" y="93.5" width="414" height="44"/>
|
||||
<rect key="frame" x="0.0" y="99.5" width="414" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="1cB-yn-7ii" id="xFt-Jc-feN">
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="44"/>
|
||||
|
@ -381,7 +391,7 @@
|
|||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" id="Fzo-Cj-aM4">
|
||||
<rect key="frame" x="0.0" y="137.5" width="414" height="44"/>
|
||||
<rect key="frame" x="0.0" y="143.5" width="414" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="Fzo-Cj-aM4" id="vSb-0G-Bic">
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="44"/>
|
||||
|
@ -392,7 +402,7 @@
|
|||
<sections/>
|
||||
</tableView>
|
||||
<view userInteractionEnabled="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="sDX-BN-qLw" userLabel="OverlayView">
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="786"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="830"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</view>
|
||||
</subviews>
|
||||
|
@ -447,7 +457,7 @@
|
|||
<objects>
|
||||
<viewController id="10570" customClass="SetupViewController" sceneMemberID="viewController">
|
||||
<view key="view" contentMode="scaleToFill" id="10575">
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="786"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="830"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<subviews>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Extension Activated!" textAlignment="center" lineBreakMode="tailTruncation" minimumFontSize="10" translatesAutoresizingMaskIntoConstraints="NO" id="11092">
|
||||
|
@ -528,7 +538,7 @@
|
|||
<objects>
|
||||
<tableViewController id="11543" customClass="LoginSearchViewController" sceneMemberID="viewController">
|
||||
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="28" sectionFooterHeight="28" id="11545">
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="786"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="830"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<searchBar key="tableHeaderView" contentMode="redraw" id="13084">
|
||||
|
@ -541,7 +551,7 @@
|
|||
</searchBar>
|
||||
<prototypes>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" id="11548">
|
||||
<rect key="frame" x="0.0" y="88.5" width="414" height="44"/>
|
||||
<rect key="frame" x="0.0" y="94" width="414" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="11548" id="11549">
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="44"/>
|
||||
|
@ -601,13 +611,13 @@
|
|||
</scene>
|
||||
</scenes>
|
||||
<inferredMetricsTieBreakers>
|
||||
<segue reference="12574"/>
|
||||
<segue reference="12959"/>
|
||||
<segue reference="3731"/>
|
||||
</inferredMetricsTieBreakers>
|
||||
<resources>
|
||||
<image name="check.png" width="90" height="90"/>
|
||||
<image name="logo.png" width="282" height="44"/>
|
||||
<image name="person.2" catalog="system" width="128" height="81"/>
|
||||
<image name="person.2" catalog="system" width="128" height="87"/>
|
||||
<systemColor name="darkTextColor">
|
||||
<color white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</systemColor>
|
||||
|
|
24
src/iOS.Core/Handlers/CustomWindowHandler.cs
Normal file
24
src/iOS.Core/Handlers/CustomWindowHandler.cs
Normal file
|
@ -0,0 +1,24 @@
|
|||
using Microsoft.Maui.Handlers;
|
||||
using UIKit;
|
||||
|
||||
namespace Bit.iOS.Core.Handlers
|
||||
{
|
||||
public class CustomWindowHandler : ElementHandler<IWindow, UIWindow>, IWindowHandler
|
||||
{
|
||||
public static IPropertyMapper<IWindow, IWindowHandler> Mapper = new PropertyMapper<IWindow, IWindowHandler>(ElementHandler.ElementMapper)
|
||||
{
|
||||
};
|
||||
|
||||
public CustomWindowHandler() : base(Mapper)
|
||||
{
|
||||
}
|
||||
|
||||
protected override UIWindow CreatePlatformElement()
|
||||
{
|
||||
// Haven't tested
|
||||
return UIApplication.SharedApplication.Delegate.GetWindow();
|
||||
//return Platform.GetCurrentUIViewController().View.Window;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -27,7 +27,12 @@ namespace Bit.iOS.Core.Utilities
|
|||
|
||||
public static void SetupMaui()
|
||||
{
|
||||
var builder = Bit.Core.MauiProgram.ConfigureMauiAppBuilder(ConfigureMAUIEffects, ConfigureMAUIHandlers)
|
||||
var builder = Bit.Core.MauiProgram.ConfigureMauiAppBuilder(ConfigureMAUIEffects, handlers =>
|
||||
{
|
||||
// WORKAROUND: This is needed to make TapGestureRecognizer work on extensions.
|
||||
handlers.AddHandler(typeof(Window), typeof(Handlers.CustomWindowHandler));
|
||||
ConfigureMAUIHandlers(handlers);
|
||||
})
|
||||
.UseMauiEmbedding<Application>();
|
||||
// Register the Window
|
||||
builder.Services.Add(new ServiceDescriptor(typeof(UIWindow), UIApplication.SharedApplication.KeyWindow));
|
||||
|
|
Loading…
Reference in a new issue