diff --git a/Mac/MainWindow/OPML/ExportOPMLWindowController.swift b/Mac/MainWindow/OPML/ExportOPMLWindowController.swift index ad709cec5..9c7a264fb 100644 --- a/Mac/MainWindow/OPML/ExportOPMLWindowController.swift +++ b/Mac/MainWindow/OPML/ExportOPMLWindowController.swift @@ -75,7 +75,7 @@ import Account func exportOPML(account: Account) { let panel = NSSavePanel() - panel.allowedFileTypes = ["opml"] + panel.allowedContentTypes = [.xml] panel.allowsOtherFileTypes = false panel.prompt = NSLocalizedString("panel.prompt.export-opml", comment: "Export OPML") panel.title = NSLocalizedString("panel.title.export-opml", comment: "Export OPML") diff --git a/Mac/MainWindow/OPML/ImportOPMLWindowController.swift b/Mac/MainWindow/OPML/ImportOPMLWindowController.swift index 3a53c3de3..a0fb996c3 100644 --- a/Mac/MainWindow/OPML/ImportOPMLWindowController.swift +++ b/Mac/MainWindow/OPML/ImportOPMLWindowController.swift @@ -85,7 +85,7 @@ import Account panel.allowsMultipleSelection = false panel.canChooseDirectories = false panel.resolvesAliases = true - panel.allowedFileTypes = ["opml", "xml"] + panel.allowedContentTypes = [.xml, .opml] panel.allowsOtherFileTypes = false panel.beginSheetModal(for: hostWindow!) { modalResult in diff --git a/Mac/Resources/Info.plist b/Mac/Resources/Info.plist index a5e21c04c..c59d5ae97 100644 --- a/Mac/Resources/Info.plist +++ b/Mac/Resources/Info.plist @@ -6,10 +6,27 @@ group.$(ORGANIZATION_IDENTIFIER).NetNewsWire-Evergreen AppIdentifierPrefix $(AppIdentifierPrefix) - ITSAppUsesNonExemptEncryption - CFBundleDevelopmentRegion en + CFBundleDocumentTypes + + + CFBundleTypeExtensions + + nnwtheme + + CFBundleTypeName + NetNewsWire Theme + CFBundleTypeRole + Viewer + LSItemContentTypes + + com.ranchero.netnewswire.theme + + LSTypeIsPackage + + + CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIconFile @@ -48,6 +65,8 @@ $(DEVELOPER_ENTITLEMENTS) FeedURLForTestBuilds https://ranchero.com/downloads/netnewswire-beta.xml + ITSAppUsesNonExemptEncryption + LSApplicationCategoryType public.app-category.news LSMinimumSystemVersion @@ -77,27 +96,6 @@ $(ORGANIZATION_IDENTIFIER) SUFeedURL https://ranchero.com/downloads/netnewswire-release.xml - UserAgent - NetNewsWire (RSS Reader; https://netnewswire.com/) - CFBundleDocumentTypes - - - CFBundleTypeExtensions - - nnwtheme - - CFBundleTypeName - NetNewsWire Theme - CFBundleTypeRole - Viewer - LSItemContentTypes - - com.ranchero.netnewswire.theme - - LSTypeIsPackage - - - UTImportedTypeDeclarations @@ -119,6 +117,27 @@ + + UTTypeConformsTo + + public.xml + + UTTypeDescription + OPML + UTTypeIcons + + UTTypeIdentifier + public.opml + UTTypeTagSpecification + + public.filename-extension + + opml + + + + UserAgent + NetNewsWire (RSS Reader; https://netnewswire.com/) diff --git a/NetNewsWire.xcodeproj/project.pbxproj b/NetNewsWire.xcodeproj/project.pbxproj index c4ac4cb7c..692c5018b 100644 --- a/NetNewsWire.xcodeproj/project.pbxproj +++ b/NetNewsWire.xcodeproj/project.pbxproj @@ -882,6 +882,9 @@ DFD406FF291FDC0C00C02962 /* DisplayAndBehaviorsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DFD406FE291FDC0C00C02962 /* DisplayAndBehaviorsView.swift */; }; DFD86796295D553D0070D62D /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = DFD86798295D553D0070D62D /* Localizable.strings */; }; DFE522A32953DEF400376B77 /* CustomInsetGroupedRowStyle.swift in Sources */ = {isa = PBXBuildFile; fileRef = DFE522A22953DEF400376B77 /* CustomInsetGroupedRowStyle.swift */; }; + DFEB034D2A273BFE00C7573A /* UTType.swift in Sources */ = {isa = PBXBuildFile; fileRef = DFEB034C2A273BFE00C7573A /* UTType.swift */; }; + DFEB034E2A273BFE00C7573A /* UTType.swift in Sources */ = {isa = PBXBuildFile; fileRef = DFEB034C2A273BFE00C7573A /* UTType.swift */; }; + DFEB034F2A273BFE00C7573A /* UTType.swift in Sources */ = {isa = PBXBuildFile; fileRef = DFEB034C2A273BFE00C7573A /* UTType.swift */; }; DFFB8FC2279B75E300AC21D7 /* Account in Embed Frameworks */ = {isa = PBXBuildFile; productRef = 51BC2F4A24D343A500E90810 /* Account */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; DFFC4E7428E95C01006B82AF /* AboutView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DFFC4E7328E95C01006B82AF /* AboutView.swift */; }; FF3ABF13232599810074C542 /* ArticleSorterTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF3ABF09232599450074C542 /* ArticleSorterTests.swift */; }; @@ -1701,6 +1704,7 @@ DFD6AACB27ADE80900463FAD /* NewsFax.nnwtheme */ = {isa = PBXFileReference; lastKnownFileType = wrapper; path = NewsFax.nnwtheme; sourceTree = ""; }; DFD86797295D553D0070D62D /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = ""; }; DFE522A22953DEF400376B77 /* CustomInsetGroupedRowStyle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CustomInsetGroupedRowStyle.swift; sourceTree = ""; }; + DFEB034C2A273BFE00C7573A /* UTType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UTType.swift; sourceTree = ""; }; DFFC4E7328E95C01006B82AF /* AboutView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AboutView.swift; sourceTree = ""; }; FF3ABF09232599450074C542 /* ArticleSorterTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArticleSorterTests.swift; sourceTree = ""; }; FF3ABF1423259DDB0074C542 /* ArticleSorter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArticleSorter.swift; sourceTree = ""; }; @@ -2485,6 +2489,7 @@ 84411E701FE5FBFA004B527F /* SmallIconProvider.swift */, 51BC4ADD247277DF000A6ED8 /* URL-Extensions.swift */, 51D205EE28E3CF8D007C46EF /* LinkTextField.swift */, + DFEB034C2A273BFE00C7573A /* UTType.swift */, ); path = Extensions; sourceTree = ""; @@ -3764,6 +3769,7 @@ }; 652832CF2683DD0400E6F37C /* Run Script: Delete Unnecessary Frameworks For Share Extension */ = { isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); @@ -3800,6 +3806,7 @@ }; 65ED406F235DEF6C0081F399 /* Run Script: Automated build numbers */ = { isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); @@ -3833,6 +3840,7 @@ }; 7180F95C265B67B800189094 /* Run Script: Delete Unnecessary Frameworks For Share Extension */ = { isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); @@ -3851,6 +3859,7 @@ }; 8423E3E3220158E700C3795B /* Run Script: Code Sign Sparkle */ = { isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); @@ -3869,6 +3878,7 @@ }; 84C987A52000AC9E0066B150 /* Run Script: Automated build numbers */ = { isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); @@ -4148,6 +4158,7 @@ B2B80779239C4C7300F191E0 /* RSImage-AppIcons.swift in Sources */, 65ED4026235DEF6C0081F399 /* TimelineTableRowView.swift in Sources */, 65ED4027235DEF6C0081F399 /* UnreadIndicatorView.swift in Sources */, + DFEB034E2A273BFE00C7573A /* UTType.swift in Sources */, 51A9A5F22380DE520033AADF /* AddWebFeedDefaultContainer.swift in Sources */, 65ED4028235DEF6C0081F399 /* ExtractedArticle.swift in Sources */, 65ED4029235DEF6C0081F399 /* DeleteCommand.swift in Sources */, @@ -4233,6 +4244,7 @@ 513146B2235A81A400387FDC /* AddWebFeedIntentHandler.swift in Sources */, 51D87EE12311D34700E63F03 /* ActivityType.swift in Sources */, 51C452772265091600C03939 /* MultilineUILabelSizer.swift in Sources */, + DFEB034F2A273BFE00C7573A /* UTType.swift in Sources */, 51C452A522650A2D00C03939 /* SmallIconProvider.swift in Sources */, DF28B453294FE6C600C4D8CA /* EnableExtensionPointView.swift in Sources */, 51AB8AB323B7F4C6008F147D /* WebViewController.swift in Sources */, @@ -4542,6 +4554,7 @@ 849A97541ED9EAC0007D329B /* AddWebFeedWindowController.swift in Sources */, DF3630EB2936183D00326FB8 /* OPMLDocument.swift in Sources */, 5144EA40227A37EC00D19003 /* ImportOPMLWindowController.swift in Sources */, + DFEB034D2A273BFE00C7573A /* UTType.swift in Sources */, 178A9F9D2549449F00AB7E9D /* AddAccountsView.swift in Sources */, 51C4CFF024D37D1F00AF9874 /* Secrets.swift in Sources */, 849A976D1ED9EBC8007D329B /* TimelineTableView.swift in Sources */, diff --git a/Shared/ArticleStyles/ArticleTheme.swift b/Shared/ArticleStyles/ArticleTheme.swift index afd5a1d80..2a1c712dc 100644 --- a/Shared/ArticleStyles/ArticleTheme.swift +++ b/Shared/ArticleStyles/ArticleTheme.swift @@ -7,13 +7,7 @@ // import Foundation -import UniformTypeIdentifiers -public extension UTType { - static var nnwTheme: UTType { - UTType("com.ranchero.netnewswire.theme")! - } -} struct ArticleTheme: Equatable { diff --git a/Shared/Extensions/UTType.swift b/Shared/Extensions/UTType.swift new file mode 100644 index 000000000..082d29ba6 --- /dev/null +++ b/Shared/Extensions/UTType.swift @@ -0,0 +1,19 @@ +// +// UTType.swift +// NetNewsWire +// +// Created by Stuart Breckenridge on 31/05/2023. +// Copyright © 2023 Ranchero Software. All rights reserved. +// + +import Foundation +import UniformTypeIdentifiers + +public extension UTType { + static var nnwTheme: UTType { + UTType("com.ranchero.netnewswire.theme")! + } + static var opml: UTType { + UTType("public.opml")! + } +}