Skip to content

Commit 4ee133f

Browse files
Merge pull request #1794 from microsoft/develop
Fix Dotnet MAUI demo apps
2 parents d1cb57c + 5c20c55 commit 4ee133f

File tree

4 files changed

+27
-11
lines changed

4 files changed

+27
-11
lines changed

Apps/Contoso.MAUI.Demo/App.xaml.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ private void StartAppCenter()
7777
{
7878
AppCenter.SetMaxStorageSizeAsync(Preferences.Get(Constants.StorageMaxSize, 0));
7979
}
80-
AppCenter.PlatformSetDataResidencyRegion(Preferences.Get(Constants.DataResidencyRegion, null));
80+
AppCenter.SetDataResidencyRegion(Preferences.Get(Constants.DataResidencyRegion, null));
8181

8282
var appSecret = GetTokensString();
8383
AppCenter.Start(appSecret, typeof(Analytics), typeof(Crashes), typeof(Distribute));

Apps/Contoso.MAUI.Demo/Contoso.MAUI.Demo.csproj

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
<Project Sdk="Microsoft.NET.Sdk">
33
<PropertyGroup>
44
<TargetFrameworks>net8.0-android;net8.0-ios;net8.0-maccatalyst</TargetFrameworks>
5-
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net6.0-windows10.0.19041.0</TargetFrameworks>
5+
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">
6+
$(TargetFrameworks);net6.0-windows10.0.19041.0</TargetFrameworks>
67
<OutputType>Exe</OutputType>
78
<RootNamespace>Contoso.MAUI.Demo</RootNamespace>
89
<UseMaui>true</UseMaui>
@@ -15,12 +16,21 @@
1516
<!-- App Identifier -->
1617
<ApplicationId>com.microsoft.appcenter.Contoso.MAUI.Demo</ApplicationId>
1718
<ApplicationIdGuid>d7a06185-3470-4ae9-8a6f-27a861f146b2</ApplicationIdGuid>
18-
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">14.2</SupportedOSPlatformVersion>
19-
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">14.0</SupportedOSPlatformVersion>
20-
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">21.0</SupportedOSPlatformVersion>
21-
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</SupportedOSPlatformVersion>
22-
<TargetPlatformMinVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</TargetPlatformMinVersion>
23-
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'tizen'">6.5</SupportedOSPlatformVersion>
19+
<SupportedOSPlatformVersion
20+
Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">14.2</SupportedOSPlatformVersion>
21+
<SupportedOSPlatformVersion
22+
Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">
23+
14.0</SupportedOSPlatformVersion>
24+
<SupportedOSPlatformVersion
25+
Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">21.0</SupportedOSPlatformVersion>
26+
<SupportedOSPlatformVersion
27+
Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">
28+
10.0.17763.0</SupportedOSPlatformVersion>
29+
<TargetPlatformMinVersion
30+
Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">
31+
10.0.17763.0</TargetPlatformMinVersion>
32+
<SupportedOSPlatformVersion
33+
Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'tizen'">6.5</SupportedOSPlatformVersion>
2434
<Configurations>Debug;Release;GooglePlay</Configurations>
2535
</PropertyGroup>
2636
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'GooglePlay|AnyCPU' ">
@@ -34,9 +44,15 @@
3444
<NoWarn></NoWarn>
3545
<NoStdLib>false</NoStdLib>
3646
</PropertyGroup>
47+
<PropertyGroup
48+
Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">
49+
<RuntimeIdentifier>iossimulator-x64</RuntimeIdentifier>
50+
<ForceSimulatorX64ArchitectureInIDE>true</ForceSimulatorX64ArchitectureInIDE>
51+
</PropertyGroup>
3752
<ItemGroup>
3853
<!-- App Icon -->
39-
<MauiIcon Include="Resources\AppIcon\appicon.svg" ForegroundFile="Resources\AppIcon\appiconfg.svg" Color="#512BD4" />
54+
<MauiIcon Include="Resources\AppIcon\appicon.svg"
55+
ForegroundFile="Resources\AppIcon\appiconfg.svg" Color="#512BD4" />
4056
<!-- Splash Screen -->
4157
<MauiSplashScreen Include="Resources\Splash\splash.svg" Color="#512BD4" BaseSize="128,128" />
4258
<!-- Images -->

Apps/Contoso.MAUI.Demo/ModulePages/AppCenterContentPage.xaml.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ private void SaveStorageSize_Clicked(object sender, System.EventArgs e)
8282
private void SaveDataResidencyRegion_Clicked(object sender, System.EventArgs e)
8383
{
8484
var inputText = DataResidencyRegion.Text;
85-
AppCenter.PlatformSetDataResidencyRegion(inputText);
85+
AppCenter.SetDataResidencyRegion(inputText);
8686
Preferences.Set(Constants.DataResidencyRegion, inputText);
8787
}
8888

Apps/Contoso.MAUI.Demo/global.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"sdk": {
3-
"version": "7.0.308"
3+
"version": "8.0.401"
44
}
55
}

0 commit comments

Comments
 (0)