Skip to content

Commit 17eadd9

Browse files
committed
sample: Added NativeAOT support to test lib compatibility.
1 parent 0152ac8 commit 17eadd9

File tree

5 files changed

+14
-40
lines changed

5 files changed

+14
-40
lines changed

Maui.AppStoreInfo.sln

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{
2626
.github\workflows\pr.yml = .github\workflows\pr.yml
2727
EndProjectSection
2828
EndProject
29-
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "helpers", "helpers", "{E9A82491-47A5-4EFC-9AAA-D7E5382A22DB}"
30-
EndProject
31-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TrimmingHelper", "src\helpers\TrimmingHelper\TrimmingHelper.csproj", "{F464A23B-B245-4687-BFB3-0DB3FEEAC38B}"
32-
EndProject
3329
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Maui.AppStores.SampleApp", "sample\Maui.AppStores.SampleApp.csproj", "{4DC876F9-311E-4FDE-89B0-A73BD145B1C4}"
3430
EndProject
3531
Global
@@ -42,10 +38,6 @@ Global
4238
{8E7AE677-AD62-4FFE-ACBF-0F1A947ACDDB}.Debug|Any CPU.Build.0 = Debug|Any CPU
4339
{8E7AE677-AD62-4FFE-ACBF-0F1A947ACDDB}.Release|Any CPU.ActiveCfg = Release|Any CPU
4440
{8E7AE677-AD62-4FFE-ACBF-0F1A947ACDDB}.Release|Any CPU.Build.0 = Release|Any CPU
45-
{F464A23B-B245-4687-BFB3-0DB3FEEAC38B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
46-
{F464A23B-B245-4687-BFB3-0DB3FEEAC38B}.Debug|Any CPU.Build.0 = Debug|Any CPU
47-
{F464A23B-B245-4687-BFB3-0DB3FEEAC38B}.Release|Any CPU.ActiveCfg = Release|Any CPU
48-
{F464A23B-B245-4687-BFB3-0DB3FEEAC38B}.Release|Any CPU.Build.0 = Release|Any CPU
4941
{4DC876F9-311E-4FDE-89B0-A73BD145B1C4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
5042
{4DC876F9-311E-4FDE-89B0-A73BD145B1C4}.Debug|Any CPU.Build.0 = Debug|Any CPU
5143
{4DC876F9-311E-4FDE-89B0-A73BD145B1C4}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -57,7 +49,6 @@ Global
5749
GlobalSection(NestedProjects) = preSolution
5850
{8E7AE677-AD62-4FFE-ACBF-0F1A947ACDDB} = {928D4422-05CE-4AC2-89B0-31060889AE6A}
5951
{8DEF204E-ED5E-45A8-B021-47F6588890F4} = {94FE90BF-FA05-46C6-A207-6E454A236659}
60-
{F464A23B-B245-4687-BFB3-0DB3FEEAC38B} = {E9A82491-47A5-4EFC-9AAA-D7E5382A22DB}
6152
{4DC876F9-311E-4FDE-89B0-A73BD145B1C4} = {4746EB5B-E37C-40F0-8CA6-7D03185F5370}
6253
EndGlobalSection
6354
GlobalSection(ExtensibilityGlobals) = postSolution

sample/Maui.AppStores.SampleApp.csproj

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,12 @@
3838
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'tizen'">6.5</SupportedOSPlatformVersion>
3939

4040
<MauiEnableXamlCBindingWithSourceCompilation>true</MauiEnableXamlCBindingWithSourceCompilation>
41+
42+
<TrimMode>full</TrimMode>
43+
<IsAotCompatible>true</IsAotCompatible>
44+
45+
<PublishAot Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">true</PublishAot>
46+
<PublishAot Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">true</PublishAot>
4147
</PropertyGroup>
4248

4349
<ItemGroup>

sample/Resources/Styles/Styles.xaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,14 @@
399399

400400
<Style TargetType="Shell" ApplyToDerivedTypes="True">
401401
<Setter Property="Shell.BackgroundColor" Value="{AppThemeBinding Light={StaticResource White}, Dark={StaticResource OffBlack}}" />
402-
<Setter Property="Shell.ForegroundColor" Value="{OnPlatform WinUI={StaticResource Primary}, Default={StaticResource White}}" />
402+
<Setter Property="Shell.ForegroundColor">
403+
<Setter.Value>
404+
<OnPlatform x:TypeArguments="Color">
405+
<On Platform="WinUI" Value="{StaticResource Primary}" />
406+
<On Platform="Default" Value="{StaticResource White}" />
407+
</OnPlatform>
408+
</Setter.Value>
409+
</Setter>
403410
<Setter Property="Shell.TitleColor" Value="{AppThemeBinding Light={StaticResource Black}, Dark={StaticResource SecondaryDarkText}}" />
404411
<Setter Property="Shell.DisabledColor" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource Gray950}}" />
405412
<Setter Property="Shell.UnselectedColor" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource Gray200}}" />

src/helpers/TrimmingHelper/Program.cs

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/helpers/TrimmingHelper/TrimmingHelper.csproj

Lines changed: 0 additions & 29 deletions
This file was deleted.

0 commit comments

Comments
 (0)