-
Notifications
You must be signed in to change notification settings - Fork 559
Closed
Labels
Milestone
Description
Apple platform
iOS
Framework version
net9.0-*
Affected platform version
.NET 9, ios workload : 9.0.308.2
Description
While upgrading xcode 26.0 on my .NET 9 application, I noticed a warning in my CarPlay app.
Apple introduced https://developer.apple.com/documentation/carplay/cpgridbutton/init(titlevariants:image:messageconfiguration:handler:)?language=objc in addition to the existing https://developer.apple.com/documentation/carplay/cpgridbutton/init(titlevariants:image:handler:)?language=objc
However I don't see any Obsolete on the apple documentation, that would justify to reflect in the .NET bindings
[Export("initWithTitleVariants:image:handler:")]
[ObsoletedOSPlatform("ios26.0", "Use 'Constructor (string[], UIImage, CPMessageGridItemConfiguration, Action<CPGridButton>)' instead.")]
[SupportedOSPlatform("ios")]
public CPGridButton(string[] titleVariants, UIImage image, [BlockProxy(typeof(NIDActionArity1V34))] Action<CPGridButton>? handler);
[DesignatedInitializer]
[Export("initWithTitleVariants:image:messageConfiguration:handler:")]
[SupportedOSPlatform("ios26.0")]
public CPGridButton(string[] titleVariants, UIImage image, CPMessageGridItemConfiguration? messageConfiguration, [BlockProxy(typeof(NIDActionArity1V34))] Action<CPGridButton>? handler);I guess it's related by it's also producing a warning :

I can wrap it inside a pragma warning disable, but am I doing something wrong here ?
Thank's in advance !
Steps to Reproduce
My minimum iOS version is 16.0 :
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">16.0</SupportedOSPlatformVersion>CPGridButton gridButton;
if (OperatingSystem.IsIOSVersionAtLeast(26, 0))
{
gridButton = new CPGridButton([text], image, messageConfiguration: null, handler: null); // Warning here
}
else
{
gridButton = new CPGridButton([text], image, handler: null);
}
rows.Add(gridButton);Did you find any workaround?
No response
Relevant log output
No response
Reactions are currently unavailable