Open spenol opened 3 months ago
I am receiving a similar issue at this step. I added a using AiForms.Settings; to the MauiProgram.cs file and it will recognize .UseSettingsView()
It does debug under Android emulator. However, there is a global debugger error whenever using Windows machine to debug. I have not entered any other code for this package, yet.
I needed to fix it like this
public static MauiApp CreateMauiApp()
{
var builder = MauiApp.CreateBuilder();
builder
.UseMauiApp
// Bypass UseSettingsView on Windows in debug mode
if (!OperatingSystem.IsWindows())
{
builder.UseSettingsView();
}
builder.UseSettingsView(true)
builder.ConfigureFonts(fonts =>
{
fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold");
});
builder.Logging.AddDebug();
return builder.Build();
}
Thank you @regolas that's helpful. I also note that when adding using AiForms.Settings, it's only recognised for iOS and not Android, Windows or MacOS.
Does anyone know if/when support of wider MAUI platforms may be included? If not, I may need to move to another solution, but don't really want to as SettingsView is by far the easiest way I've found to create settings pages....
If wider platforms aren't in scope in the near future, grateful for any easy-to-use alternatives...
@spenol @regolas Thank you for your report.
This issue does not occur in my environment (Mac / VS for Mac or Rider) I have installed it from nuget and it is working fine on Android. I have also released an application that uses this library.
It may be that this problem only occurs when deploying from Windows. I would appreciate it if you could let me know if you find anything else.
Description
When Maui.SettingsView is installed via NuGet, it doesn't seem to register in the IDE - adding the reference .UseSettingsView() in MauiApp.CreateBuilder() isn't recognised, and adding xmlns:sv="clr-namespace:AiForms.Settings;assembly=SettingsView" into xaml isn't registered.
Steps to Reproduce
Expected Behavior
.UseSettingsView() and xmln:sv references should be recognised once it's installed via NuGet
Actual Behavior
As above.
Platforms
Basic Information