Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Housekeeping] Add [SupportedOSPlatform] to AppBuilderExtensions #2488

Merged

Conversation

TheCodeTraveler
Copy link
Collaborator

@TheCodeTraveler TheCodeTraveler commented Feb 3, 2025

Description of Change

This PR adds the [SupportedOSPlatform] attribute to each AppBuilderExtensions file, declaring the minimum supported operating system version for each platform as supported by the .NET MAUI Community Toolkit(s).

This ensures that users are warned immediately when using any CommunityToolkit.Maui.* library that they may be targeting an unsupported version of iOS/Android/Windows/MacCatalyst/Tizen when initializing the toolkit. This PR follows the existing implementation set in CommunityToolkit.Maui.Camera.AppBuilderExtensions.

It's basically an easy way for us to notify developers regrading which platforms we support without requiring them to read the Release Notes.

PR Checklist

Additional information

The version numbers align with the SupportedOSPlatformVersion noted in each library's csproj:

<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">15.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">15.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">21.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</SupportedOSPlatformVersion>
<TargetPlatformMinVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</TargetPlatformMinVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'tizen'">6.5</SupportedOSPlatformVersion>

This PR also renames CommunityToolkit.Maui.Maps.AppHostBuilderExtension -> CommunityToolkit.Maui.Maps.AppBuilderExtension to align with the naming used in CommunityToolkit.Maui, CommunityToolkit.Maui.Core, CommunityToolkit.Maui.MediaElement and CommunityToolkit.Maui.Camera.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 5 out of 6 changed files in this pull request and generated no comments.

Files not reviewed (1)
  • src/CommunityToolkit.Maui/PlatformConfiguration/AndroidSpecific/NavigationBar.cs: Evaluated as low risk
@TheCodeTraveler TheCodeTraveler enabled auto-merge (squash) February 3, 2025 20:12
@TheCodeTraveler TheCodeTraveler removed the request for review from bijington February 3, 2025 20:12
@TheCodeTraveler TheCodeTraveler added ♻ housekeeping This issue/PR is related to internal stuff. 📽️ MediaElement Issue/PR that has to do with MediaElement 🗺️ Map Issue/PR that has to do with Map (Windows) area/core Issue/Discussion/PR that has to do with the core of the toolkit Camera 📸 Issue/PR associated with the Camera package labels Feb 3, 2025
Copy link
Contributor

@ne0rrmatrix ne0rrmatrix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is sweet! I am happy to see the build message about versions being put to rest for all those messages.

@TheCodeTraveler TheCodeTraveler merged commit c7d2d1f into main Feb 3, 2025
10 checks passed
@TheCodeTraveler TheCodeTraveler deleted the Add-`-SupportedOSPlatform]`-to-AppBuilderExtensions branch February 3, 2025 20:48
@github-actions github-actions bot locked and limited conversation to collaborators Feb 5, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/core Issue/Discussion/PR that has to do with the core of the toolkit Camera 📸 Issue/PR associated with the Camera package ♻ housekeeping This issue/PR is related to internal stuff. 🗺️ Map Issue/PR that has to do with Map (Windows) 📽️ MediaElement Issue/PR that has to do with MediaElement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants