Skip to content

[AOT] ExtendedSplashScreen.SplashScreenContent cannot be found #1510

@jonpryor

Description

@jonpryor

What would you like to be added:

Improve support for NativeAOT

Why is this needed:

NativeAOT is the new hawtness.

For which Platform:

  • WebAssembly
  • Android
  • iOS
  • macOS (AppKit)
  • Mac Catalyst
  • Skia
    • WPF
    • GTK (Linux)
    • Linux Framebuffer
    • Tizen
  • Windows

Anything else we need to know?

Related:

Start with unoplatform/uno.chefs, a cobbled-together NuGet environment, and then build uno.chefs for macOS+NativeAOT:

dotnet publish -c Release -r osx-x64 -f net10.0-desktop -p:TargetFrameworkOverride=net10.0-desktop -bl \
  Chefs/Chefs.csproj \
  -p:SelfContained=true -p:PublishAot=true -p:IsAotCompatible=true -p:UseSkiaRendering=true \
  -p:IlcGenerateMapFile=true -p:IlcGenerateMstatFile=true -p:IlcGenerateDgmlFile=true \
  -p:EmitCompilerGeneratedFiles=true -p:CompilerGeneratedFilesOutputPath=`pwd`/_gen

Run the app:

Chefs/bin/Release/net10.0-desktop/osx-x64/publish/Chefs

One of the earliest failure messages is:

fail: Uno.UI.DataBinding.BindingPropertyHelper[0]
      The [SplashScreenContent] property getter does not exist on type [Uno.Toolkit.UI.ExtendedSplashScreen]

Short version: Fix this.

Longer version: How do we fix this? Conjecture: it may be sufficient to use [DynamicDependency] on OnApplyTemplate() and LoadNativeSplashScreen() to cause the property to be preserved, a'la:

partial class ExtendedSplashScreen {
  [DynamicDependency(DynamicallyAccessedMemberTypes.PrivateProperties, typeof(ExtendedSplashScreen))
  protected override void OnApplyTemplate() =>}

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/enhancementNew feature or request.triage/untriagedIndicates an issue requires triaging or verification.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions