diff --git a/Mac/Preferences/General/GeneralPrefencesViewController.swift b/Mac/Preferences/General/GeneralPrefencesViewController.swift index 19fa9b7a0..7fb93a71a 100644 --- a/Mac/Preferences/General/GeneralPrefencesViewController.swift +++ b/Mac/Preferences/General/GeneralPrefencesViewController.swift @@ -10,6 +10,7 @@ import AppKit import RSCore import RSWeb import UserNotifications +import UniformTypeIdentifiers final class GeneralPreferencesViewController: NSViewController { @@ -125,7 +126,7 @@ private extension GeneralPreferencesViewController { let item = NSMenuItem(title: name, action: nil, keyEquivalent: "") item.representedObject = browser.bundleIdentifier - let icon = browser.icon ?? NSWorkspace.shared.icon(forFileType: kUTTypeApplicationBundle as String) + let icon = browser.icon ?? NSWorkspace.shared.icon(for: UTType.applicationBundle) icon.size = NSSize(width: 16.0, height: 16.0) item.image = browser.icon menu.addItem(item) diff --git a/Mac/ShareExtension/ShareViewController.swift b/Mac/ShareExtension/ShareViewController.swift index d8e655a0a..85a58488f 100644 --- a/Mac/ShareExtension/ShareViewController.swift +++ b/Mac/ShareExtension/ShareViewController.swift @@ -61,14 +61,14 @@ class ShareViewController: NSViewController { // Try to get the URL if it is passed in as a URL for item in self.extensionContext!.inputItems as! [NSExtensionItem] { for itemProvider in item.attachments! { - if itemProvider.hasItemConformingToTypeIdentifier(kUTTypeURL as String) { + if itemProvider.hasItemConformingToTypeIdentifier(UTType.url.identifier) { provider = itemProvider } } } if provider != nil { - provider!.loadItem(forTypeIdentifier: kUTTypeURL as String, options: nil, completionHandler: { [weak self] (urlCoded, error) in + provider!.loadItem(forTypeIdentifier: UTType.url.identifier, options: nil, completionHandler: { [weak self] (urlCoded, error) in if error != nil { return }