Description:
When targeting .NET 10 (net10.0-maccatalyst) with .NET MAUI, the UniformTypeIdentifiers.UTType.Folder property is not available in the C# bindings. This prevents developers from using the modern UIDocumentPickerViewController(UTType[], UIDocumentPickerMode) API for folder picking, which is the recommended approach for MacCatalyst 14+.
Expected Behavior:
UniformTypeIdentifiers.UTType.Folder should be available in the .NET MAUI MacCatalyst bindings, allowing developers to use:
var picker = new UIDocumentPickerViewController(new UTType[] { UTType.Folder }, UIDocumentPickerMode.Open);
Actual Behavior:
The following error occurs:
'UTType' does not contain a definition for 'Folder'
Developers are forced to use the obsolete string[] overload with "public.folder":
var picker = new UIDocumentPickerViewController(new string[] { "public.folder" }, UIDocumentPickerMode.Open);
This triggers obsolescence warnings and is not future-proof.
Steps to Reproduce
Create a .NET MAUI 10 project targeting net10.0-maccatalyst.
Attempt to use UniformTypeIdentifiers.UTType.Folder in code.
Observe that the property does not exist.
Environment:
.NET MAUI 10
Target: net10.0-maccatalyst
macOS (latest)
MacAppIssue.zip
Description:
When targeting .NET 10 (net10.0-maccatalyst) with .NET MAUI, the UniformTypeIdentifiers.UTType.Folder property is not available in the C# bindings. This prevents developers from using the modern UIDocumentPickerViewController(UTType[], UIDocumentPickerMode) API for folder picking, which is the recommended approach for MacCatalyst 14+.
Expected Behavior:
UniformTypeIdentifiers.UTType.Folder should be available in the .NET MAUI MacCatalyst bindings, allowing developers to use:
var picker = new UIDocumentPickerViewController(new UTType[] { UTType.Folder }, UIDocumentPickerMode.Open);
Actual Behavior:
The following error occurs:
'UTType' does not contain a definition for 'Folder'
Developers are forced to use the obsolete string[] overload with "public.folder":
var picker = new UIDocumentPickerViewController(new string[] { "public.folder" }, UIDocumentPickerMode.Open);
This triggers obsolescence warnings and is not future-proof.
Steps to Reproduce
Create a .NET MAUI 10 project targeting net10.0-maccatalyst.
Attempt to use UniformTypeIdentifiers.UTType.Folder in code.
Observe that the property does not exist.
Environment:
.NET MAUI 10
Target: net10.0-maccatalyst
macOS (latest)
MacAppIssue.zip