From c725be287403c8a779694b4e97045a1884fbae62 Mon Sep 17 00:00:00 2001 From: Stuart Breckenridge Date: Thu, 19 Jan 2023 11:34:25 +0800 Subject: [PATCH 1/3] Ignores files in __MACOSX folder --- Shared/ArticleStyles/ArticleThemeDownloader.swift | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Shared/ArticleStyles/ArticleThemeDownloader.swift b/Shared/ArticleStyles/ArticleThemeDownloader.swift index 703db2ef5..dbc6d9ca9 100644 --- a/Shared/ArticleStyles/ArticleThemeDownloader.swift +++ b/Shared/ArticleStyles/ArticleThemeDownloader.swift @@ -77,6 +77,10 @@ public class ArticleThemeDownloader: Logging { private func findThemeFile(in searchPath: String) -> String? { if let directoryContents = FileManager.default.enumerator(atPath: searchPath) { while let file = directoryContents.nextObject() as? String { + if file.localizedCaseInsensitiveContains("__MACOSX") { + logger.debug("Ignoring theme file in __MACOSX folder.") + continue + } if file.hasSuffix(".nnwtheme") { return file } From 2f6584ffb1dda6d2c14d1818d77d6a16a1aebfd3 Mon Sep 17 00:00:00 2001 From: Stuart Breckenridge Date: Thu, 19 Jan 2023 12:04:43 +0800 Subject: [PATCH 2/3] changes to checking for the prefix --- Shared/ArticleStyles/ArticleThemeDownloader.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Shared/ArticleStyles/ArticleThemeDownloader.swift b/Shared/ArticleStyles/ArticleThemeDownloader.swift index dbc6d9ca9..978fe0cae 100644 --- a/Shared/ArticleStyles/ArticleThemeDownloader.swift +++ b/Shared/ArticleStyles/ArticleThemeDownloader.swift @@ -77,7 +77,7 @@ public class ArticleThemeDownloader: Logging { private func findThemeFile(in searchPath: String) -> String? { if let directoryContents = FileManager.default.enumerator(atPath: searchPath) { while let file = directoryContents.nextObject() as? String { - if file.localizedCaseInsensitiveContains("__MACOSX") { + if file.hasPrefix("__MACOSX/") { logger.debug("Ignoring theme file in __MACOSX folder.") continue } From 09700e52203ad9b014f4be324918697e64f11b0c Mon Sep 17 00:00:00 2001 From: Stuart Breckenridge Date: Mon, 6 Feb 2023 20:41:44 +0800 Subject: [PATCH 3/3] Resolves various warnings (see description) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The iOS extensions that exhibited the “linking against a dylib which is not safe for use in application extensions” warning have had a `$(inherited) -Xlinker -no_application_extension` entry added to their respective `Other Linker Flags` Build Phase configuration. The “Delete Unecessary Frameworks” warning has been suppressed making it run on incremental builds. --- NetNewsWire.xcodeproj/project.pbxproj | 33 ++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/NetNewsWire.xcodeproj/project.pbxproj b/NetNewsWire.xcodeproj/project.pbxproj index b30af17ee..30d2d8b1a 100644 --- a/NetNewsWire.xcodeproj/project.pbxproj +++ b/NetNewsWire.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 52; + objectVersion = 54; objects = { /* Begin PBXBuildFile section */ @@ -3587,6 +3587,7 @@ }; 5170CA5A279E468000702605 /* Delete Unnecessary Frameworks */ = { isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); @@ -4624,6 +4625,11 @@ isa = XCBuildConfiguration; baseConfigurationReference = 1768140A2564BB8300D98635 /* NetNewsWire_iOSwidgetextension_target.xcconfig */; buildSettings = { + OTHER_LDFLAGS = ( + "$(inherited)", + "-Xlinker", + "-no_application_extension", + ); }; name = Debug; }; @@ -4631,6 +4637,11 @@ isa = XCBuildConfiguration; baseConfigurationReference = 1768140A2564BB8300D98635 /* NetNewsWire_iOSwidgetextension_target.xcconfig */; buildSettings = { + OTHER_LDFLAGS = ( + "$(inherited)", + "-Xlinker", + "-no_application_extension", + ); }; name = Release; }; @@ -4652,6 +4663,11 @@ isa = XCBuildConfiguration; baseConfigurationReference = 51314617235A797400387FDC /* NetNewsWire_iOSintentextension_target.xcconfig */; buildSettings = { + OTHER_LDFLAGS = ( + "$(inherited)", + "-Xlinker", + "-no_application_extension", + ); }; name = Debug; }; @@ -4659,6 +4675,11 @@ isa = XCBuildConfiguration; baseConfigurationReference = 51314617235A797400387FDC /* NetNewsWire_iOSintentextension_target.xcconfig */; buildSettings = { + OTHER_LDFLAGS = ( + "$(inherited)", + "-Xlinker", + "-no_application_extension", + ); }; name = Release; }; @@ -4666,6 +4687,11 @@ isa = XCBuildConfiguration; baseConfigurationReference = 515D4FCE2325B3D000EE1167 /* NetNewsWire_iOSshareextension_target.xcconfig */; buildSettings = { + OTHER_LDFLAGS = ( + "$(inherited)", + "-Xlinker", + "-no_application_extension", + ); }; name = Debug; }; @@ -4673,6 +4699,11 @@ isa = XCBuildConfiguration; baseConfigurationReference = 515D4FCE2325B3D000EE1167 /* NetNewsWire_iOSshareextension_target.xcconfig */; buildSettings = { + OTHER_LDFLAGS = ( + "$(inherited)", + "-Xlinker", + "-no_application_extension", + ); }; name = Release; };