Open kotlarmilos opened 1 year ago
@dalexsoto Should we move this issue to the Maui repository?
@kotlarmilos my guess would be that this is because something was trimmed away, but do you know for sure?
Could be. Should we try to root some assemblies? Here is the compilation log:
/Users/miloskotlar/playground/MyMauiAppTemplate/obj/Release/net8.0-ios/ios-arm64/linked/Microsoft.iOS.dll : warning IL3053: Assembly 'Microsoft.iOS' produced AOT analysis warnings. [/Users/miloskotlar/playground/MyMauiAppTemplate/MyMauiAppTemplate.csproj::TargetFramework=net8.0-ios]
/Users/miloskotlar/playground/MyMauiAppTemplate/obj/Release/net8.0-ios/ios-arm64/linked/Microsoft.Maui.Controls.Xaml.dll : warning IL2104: Assembly 'Microsoft.Maui.Controls.Xaml' produced trim warnings. For more information see https://aka.ms/dotnet-illink/libraries [/Users/miloskotlar/playground/MyMauiAppTemplate/MyMauiAppTemplate.csproj::TargetFramework=net8.0-ios]
/Users/miloskotlar/playground/MyMauiAppTemplate/obj/Release/net8.0-ios/ios-arm64/linked/Microsoft.Maui.Controls.Xaml.dll : warning IL3053: Assembly 'Microsoft.Maui.Controls.Xaml' produced AOT analysis warnings. [/Users/miloskotlar/playground/MyMauiAppTemplate/MyMauiAppTemplate.csproj::TargetFramework=net8.0-ios]
/Users/miloskotlar/playground/MyMauiAppTemplate/obj/Release/net8.0-ios/ios-arm64/linked/Microsoft.Maui.Controls.dll : warning IL2104: Assembly 'Microsoft.Maui.Controls' produced trim warnings. For more information see https://aka.ms/dotnet-illink/libraries [/Users/miloskotlar/playground/MyMauiAppTemplate/MyMauiAppTemplate.csproj::TargetFramework=net8.0-ios]
/Users/miloskotlar/playground/MyMauiAppTemplate/obj/Release/net8.0-ios/ios-arm64/linked/Microsoft.Maui.dll : warning IL2104: Assembly 'Microsoft.Maui' produced trim warnings. For more information see https://aka.ms/dotnet-illink/libraries [/Users/miloskotlar/playground/MyMauiAppTemplate/MyMauiAppTemplate.csproj::TargetFramework=net8.0-ios]
/Users/miloskotlar/playground/MyMauiAppTemplate/obj/Release/net8.0-ios/ios-arm64/linked/Microsoft.Maui.dll : warning IL3053: Assembly 'Microsoft.Maui' produced AOT analysis warnings. [/Users/miloskotlar/playground/MyMauiAppTemplate/MyMauiAppTemplate.csproj::TargetFramework=net8.0-ios]
ILC : warning IL3000: Microsoft.AspNetCore.Components.WebView.WebViewManager.StaticWebAssetsLoader.ResolveRelativeToAssembly(): 'System.Reflection.Assembly.Location.get' always returns an empty string for assemblies embedded in a single-file app. If the path to the app directory is needed, consider calling 'System.AppContext.BaseDirectory'. [/Users/miloskotlar/playground/MyMauiAppTemplate/MyMauiAppTemplate.csproj::TargetFramework=net8.0-ios]
ILC : warning IL3000: Microsoft.AspNetCore.Components.WebView.WebViewManager.StaticWebAssetsLoader.ResolveRelativeToAssembly(): 'System.Reflection.Assembly.Location.get' always returns an empty string for assemblies embedded in a single-file app. If the path to the app directory is needed, consider calling 'System.AppContext.BaseDirectory'. [/Users/miloskotlar/playground/MyMauiAppTemplate/MyMauiAppTemplate.csproj::TargetFramework=net8.0-ios]
ILC : warning IL3000: Microsoft.AspNetCore.Components.WebView.WebViewManager.StaticWebAssetsLoader.ResolveRelativeToAssembly(): 'System.Reflection.Assembly.Location.get' always returns an empty string for assemblies embedded in a single-file app. If the path to the app directory is needed, consider calling 'System.AppContext.BaseDirectory'. [/Users/miloskotlar/playground/MyMauiAppTemplate/MyMauiAppTemplate.csproj::TargetFramework=net8.0-ios]
/Users/miloskotlar/playground/MyMauiAppTemplate/obj/Release/net8.0-ios/ios-arm64/linked/Microsoft.AspNetCore.Components.WebView.dll : warning IL2104: Assembly 'Microsoft.AspNetCore.Components.WebView' produced trim warnings. For more information see https://aka.ms/dotnet-illink/libraries [/Users/miloskotlar/playground/MyMauiAppTemplate/MyMauiAppTemplate.csproj::TargetFramework=net8.0-ios]
/Users/miloskotlar/playground/MyMauiAppTemplate/obj/Release/net8.0-ios/ios-arm64/linked/Microsoft.AspNetCore.Components.Web.dll : warning IL3053: Assembly 'Microsoft.AspNetCore.Components.Web' produced AOT analysis warnings. [/Users/miloskotlar/playground/MyMauiAppTemplate/MyMauiAppTemplate.csproj::TargetFramework=net8.0-ios]
/Users/miloskotlar/playground/MyMauiAppTemplate/obj/Release/net8.0-ios/ios-arm64/linked/Microsoft.AspNetCore.Components.dll : warning IL2104: Assembly 'Microsoft.AspNetCore.Components' produced trim warnings. For more information see https://aka.ms/dotnet-illink/libraries [/Users/miloskotlar/playground/MyMauiAppTemplate/MyMauiAppTemplate.csproj::TargetFramework=net8.0-ios]
/Users/miloskotlar/playground/MyMauiAppTemplate/obj/Release/net8.0-ios/ios-arm64/linked/Microsoft.AspNetCore.Components.WebView.dll : warning IL3053: Assembly 'Microsoft.AspNetCore.Components.WebView' produced AOT analysis warnings. [/Users/miloskotlar/playground/MyMauiAppTemplate/MyMauiAppTemplate.csproj::TargetFramework=net8.0-ios]
/Users/miloskotlar/playground/MyMauiAppTemplate/obj/Release/net8.0-ios/ios-arm64/linked/Microsoft.JSInterop.dll : warning IL3053: Assembly 'Microsoft.JSInterop' produced AOT analysis warnings. [/Users/miloskotlar/playground/MyMauiAppTemplate/MyMauiAppTemplate.csproj::TargetFramework=net8.0-ios]
/Users/miloskotlar/playground/MyMauiAppTemplate/obj/Release/net8.0-ios/ios-arm64/linked/Microsoft.JSInterop.dll : warning IL2104: Assembly 'Microsoft.JSInterop' produced trim warnings. For more information see https://aka.ms/dotnet-illink/libraries [/Users/miloskotlar/playground/MyMauiAppTemplate/MyMauiAppTemplate.csproj::TargetFramework=net8.0-ios]
Description
When attempting to use Native AOT with the Maui Blazor template targeting iOS with dotnet version
8.0.100-rtm.23479.1
, the app fails to display the main page. No errors were retrieved from the app log. The app functions correctly with the Mono runtime.Steps to Reproduce
8.0.100-rtm.23479.1
versiondotnet new maui-blazor -n "MyMauiAppTemplate"
cd MyMauiAppTemplate && dotnet publish -f net8.0-ios /p:PublishAot=true /p:PublishAotUsingRuntimePack=true -r ios-arm64
dotnet xharness apple run --app=bin/Release/net8.0-ios/ios-arm64/publish/Payload/MyMauiAppTemplate.app --targets=ios-device --output-directory=/tmp/out
Expected Behavior
The app should display the main page.
Actual Behavior
The app displays the error page.
Environment