79085663

Date: 2024-10-14 10:01:11
Score: 1.5
Natty:
Report link

You can enable only allowed content type (without subtype inheritance) by using NSOpenSavePanelDelegate - https://developer.apple.com/documentation/appkit/nsopensavepaneldelegate/1535200-panel:

func panel(_ sender: Any, shouldEnable url: URL) -> Bool {
    guard let fileType = UTType(filenameExtension: url.pathExtension) else {
        return true
    }
    
    return panel.allowedContentTypes.contains(fileType)
}

Reasons:
  • Probably link only (1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: K. Budevich