diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Maui/App.xaml.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Maui/App.xaml.cs index 588c72ab19..37848b17cf 100644 --- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Maui/App.xaml.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Maui/App.xaml.cs @@ -36,19 +36,29 @@ protected async override void OnStart() await deviceCoordinator.ApplyTheme(AppInfo.Current.RequestedTheme is AppTheme.Dark); +#if Android + //+:cnd:noEmit //#if (framework == 'net9.0') + const int minimumSupportedWebViewVersion = 94; + //#elif (framework == 'net8.0') + //#if (IsInsideProjectTemplate) + /* + //#endif + const int minimumSupportedWebViewVersion = 83; + //#if (IsInsideProjectTemplate) + */ + //#endif + //#endif //-:cnd:noEmit -#if Android + if (Version.TryParse(Android.Webkit.WebView.CurrentWebViewPackage?.VersionName, out var webViewVersion) && - webViewVersion.Major < 94) + webViewVersion.Major < minimumSupportedWebViewVersion) { await App.Current!.Windows.First().Page!.DisplayAlert("Boilerplate", localizer[nameof(AppStrings.UpdateWebViewThroughGooglePlay)], localizer[nameof(AppStrings.Ok)]); await Launcher.OpenAsync($"https://play.google.com/store/apps/details?id={Android.Webkit.WebView.CurrentWebViewPackage.PackageName}"); } #endif - //+:cnd:noEmit - //#endif } catch (Exception exp) {