diff --git a/README.md b/README.md index 5201c2d..8ee4ed2 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,7 @@ See the `DemoApp` in the `/samples` folder of this repository for a full example 🧪 [Check out the Test Project](/tests/DemoApp.UnitTests/) for demonstrations how you can write tests for code that calls this library. This will help ensure you write rock-solid apps! -| The Login page of the demo app running on WinUI | The Home page of the demo app running on Android | The Tabs page of the demo app running on Android | +| The Login page of the demo app running on WinUI | The Home page of the demo app running on iOS | The Tabs page of the demo app running on Android | | -------- | ------- | ------- | ## Getting started diff --git a/SECURITY.MD b/SECURITY.MD index 8e6bb80..8a47b5c 100644 --- a/SECURITY.MD +++ b/SECURITY.MD @@ -6,8 +6,8 @@ The latest version of the package only will be supported with security fixes. If | Version | Supported | | ------- | ------------------ | -| 0.1.x | :white_check_mark: | -| < 0.1 | :x: | +| 0.2.x | :white_check_mark: | +| < 0.2 | :x: | ## Reporting a Vulnerability Contact options: diff --git a/art/android-home.png b/art/android-home.png deleted file mode 100644 index bd45092..0000000 Binary files a/art/android-home.png and /dev/null differ diff --git a/art/ios-home.png b/art/ios-home.png new file mode 100644 index 0000000..23b8ad5 Binary files /dev/null and b/art/ios-home.png differ diff --git a/samples/DemoApp/ViewModels/BaseViewModel.cs b/samples/DemoApp/ViewModels/BaseViewModel.cs index 8263790..4debd1f 100644 --- a/samples/DemoApp/ViewModels/BaseViewModel.cs +++ b/samples/DemoApp/ViewModels/BaseViewModel.cs @@ -22,16 +22,19 @@ public BaseViewModel( #region Lifecycle events - public virtual async Task OnNavigatedTo(NavigationParameters parameters) + public virtual Task OnNavigatedTo(NavigationParameters parameters) { + return Task.CompletedTask; } - public virtual async Task OnNavigatedFrom(NavigationParameters parameters) + public virtual Task OnNavigatedFrom(NavigationParameters parameters) { + return Task.CompletedTask; } - public virtual async Task OnNavigatingFrom(NavigationParameters parameters) + public virtual Task OnNavigatingFrom(NavigationParameters parameters) { + return Task.CompletedTask; } #endregion Lifecycle events diff --git a/src/Burkus.Mvvm.Maui.SourceGenerators/AppSourceGenerator.cs b/src/Burkus.Mvvm.Maui.SourceGenerators/AppSourceGenerator.cs index 6021a54..1e37257 100644 --- a/src/Burkus.Mvvm.Maui.SourceGenerators/AppSourceGenerator.cs +++ b/src/Burkus.Mvvm.Maui.SourceGenerators/AppSourceGenerator.cs @@ -33,7 +33,7 @@ public void Execute(GeneratorExecutionContext context) // check if the App class is partial and inherits from Application var appSymbol = semanticModel.GetDeclaredSymbol(appClass); - if (appSymbol is not null && isPartial && appSymbol.BaseType.Equals(semanticModel.Compilation.GetTypeByMetadataName("Microsoft.Maui.Controls.Application"))) + if (appSymbol is not null && isPartial && SymbolEqualityComparer.Default.Equals(appSymbol.BaseType, semanticModel.Compilation.GetTypeByMetadataName("Microsoft.Maui.Controls.Application"))) { chosenAppSymbol = appSymbol; break; @@ -82,7 +82,16 @@ protected override Window CreateWindow(IActivationState? activationState) burkusMvvmBuilder.onStartFunc.Invoke(navigationService, serviceProvider); }} - return base.CreateWindow(activationState); + var window = base.CreateWindow(activationState); + +#if WINDOWS + if (window != null) + {{ + window.Title = AppInfo.Current.Name; + }} +#endif + + return window; }} }}";