CommunityToolkit / Maui

The .NET MAUI Community Toolkit is a community-created library that contains .NET MAUI Extensions, Advanced UI/UX Controls, and Behaviors to help make your life as a .NET MAUI developer easier
https://learn.microsoft.com/dotnet/communitytoolkit/maui
MIT License
2.27k stars 397 forks source link

[BUG] IOS version supported #609

Closed ForkBug closed 1 year ago

ForkBug commented 2 years ago

Is there an existing issue for this?

Current Behavior

A project said the following errors when being compiled: "warning CA1416: This call site is reachable on: 'iOS' 10.0 and later, 'maccatalyst' 10.0 and later. 'ColorConversionExtensions.WithRed(Color, double)' is only supported on: 'iOS' 14.2 and later, 'maccatalyst' 14.2 and later."

And these lines found in the CommunityToolkit.Maui/CommunityToolkit.Maui.csproj project file:

    <SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">14.2</SupportedOSPlatformVersion>
    <SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">14.0</SupportedOSPlatformVersion>

But according to the document, https://docs.microsoft.com/en-us/dotnet/communitytoolkit/maui/, iOS 10 or higher is supported.

Which one is correct?

Expected Behavior

iOS 10 or higher is supported.

Steps To Reproduce

No

Link to public reproduction project repository

https://github.com/ForkBug/MauiIOSVersion

Environment

- .NET MAUI CommunityToolkit:1.2.0
- .NET MAUI: 6.0

Anything else?

No response

VladislavAntonyuk commented 2 years ago

These are the same lines of code which are in default .NET MAUI template. Maybe the API which we use is only supported on version 14.2 and later.

ForkBug commented 2 years ago

Hope Ukraine get peace soon.

MAUI supports IOS 10 or higher (doc)

VladislavAntonyuk commented 2 years ago

Thank you @ForkBug. Could you please send a link to a small repro project. It will help us investigate the issue

ForkBug commented 2 years ago

See this project: https://github.com/ForkBug/MauiIOSVersion Build the solution with VS 17.3.3, and many warnings will show up.

MauiIOSVersion\MauiProgram.cs(10,3,11,48): warning CA1416: This call site is reachable on: 'iOS' 10.0 and later, 'maccatalyst' 10.0 and later. 'AppBuilderExtensions.UseMauiCommunityToolkit(MauiAppBuilder)' is only supported on: 'iOS' 14.2 and later, 'maccatalyst' 14.2 and later. MauiIOSVersion\CommunityToolkit.Maui.SourceGenerators\CommunityToolkit.Maui.SourceGenerators.Generators.TextColorToGenerator\TimePickerTextColorTo.g.shared.cs(48,146,48,175): warning CA1416: This call site is reachable on: 'iOS' 10.0 and later, 'maccatalyst' 10.0 and later.

I think it is due to these lines in the CommunityToolkit.Maui/CommunityToolkit.Maui.csproj project file: ` 14.2

14.0`
VladislavAntonyuk commented 2 years ago

I confirm it is reproduced. We will discuss the issue on next stand up

LennoxP90 commented 2 years ago

I second this issue, I cannot use the community toolkit unless ios 11 is at least supported