In macOS 11.0, the NSOpenPanel's allowedFileTypes property is marked as deprecated in favor of the allowedContentType property.
We're developing a plug-in to a third-party macOS app. The plug-in asks user to provide a licence file - we provide the file with our proprietary abcLicence file extension. As we cannot handle double clicks as a plug-in, we rely on NSOpenPanel triggered from the plug-in UI. Because there were close to no benefit registering the file type as we cannot respond on shell file actions, we are not including it in the plug-ins plist file. The plug-in supports macOS 10.12+.
NSOpenPanel *openDialog = [NSOpenPanel openPanel];
openDialog.title = @"Locate ABC license file";
openDialog.allowedFileTypes = @[@"abcLicence"];
How to update the code to use the new API if available while keeping supporting macOS 10.12+?