From fe0ae90f02d63165aca897f7bf49e9204edefd05 Mon Sep 17 00:00:00 2001 From: Jeremy Massel <1123407+jkmassel@users.noreply.github.com> Date: Wed, 17 Sep 2025 15:07:32 -0600 Subject: [PATCH 1/9] Adopt Xcode 26 project settings --- WordPress/WordPress.xcodeproj/project.pbxproj | 2 +- .../xcshareddata/xcschemes/Jetpack.xcscheme | 6 +++--- .../xcshareddata/xcschemes/JetpackIntents.xcscheme | 2 +- .../xcschemes/JetpackScreenshotGeneration.xcscheme | 2 +- .../xcshareddata/xcschemes/JetpackUITests.xcscheme | 2 +- .../xcshareddata/xcschemes/Keystone.xcscheme | 2 +- .../xcshareddata/xcschemes/Miniature.xcscheme | 2 +- .../xcshareddata/xcschemes/Reader.xcscheme | 2 +- .../xcshareddata/xcschemes/WordPress.xcscheme | 6 +++--- .../xcshareddata/xcschemes/WordPressAuthenticator.xcscheme | 2 +- .../xcshareddata/xcschemes/WordPressData.xcscheme | 2 +- .../xcshareddata/xcschemes/WordPressKit.xcscheme | 2 +- .../xcschemes/WordPressScreenshotGeneration.xcscheme | 2 +- .../xcshareddata/xcschemes/WordPressShareExtension.xcscheme | 2 +- .../xcshareddata/xcschemes/WordPressUITests.xcscheme | 2 +- 15 files changed, 19 insertions(+), 19 deletions(-) diff --git a/WordPress/WordPress.xcodeproj/project.pbxproj b/WordPress/WordPress.xcodeproj/project.pbxproj index ecaa52877096..7b1e5becbadb 100644 --- a/WordPress/WordPress.xcodeproj/project.pbxproj +++ b/WordPress/WordPress.xcodeproj/project.pbxproj @@ -2786,7 +2786,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 1640; - LastUpgradeCheck = 1540; + LastUpgradeCheck = 2600; ORGANIZATIONNAME = WordPress; TargetAttributes = { 0C3313B62E0439A8000C3760 = { diff --git a/WordPress/WordPress.xcodeproj/xcshareddata/xcschemes/Jetpack.xcscheme b/WordPress/WordPress.xcodeproj/xcshareddata/xcschemes/Jetpack.xcscheme index 968123f0debb..8b7fb8b87607 100644 --- a/WordPress/WordPress.xcodeproj/xcshareddata/xcschemes/Jetpack.xcscheme +++ b/WordPress/WordPress.xcodeproj/xcshareddata/xcschemes/Jetpack.xcscheme @@ -1,6 +1,6 @@ diff --git a/WordPress/WordPress.xcodeproj/xcshareddata/xcschemes/JetpackIntents.xcscheme b/WordPress/WordPress.xcodeproj/xcshareddata/xcschemes/JetpackIntents.xcscheme index c91ac9fd18d6..66bd1dda8d3d 100644 --- a/WordPress/WordPress.xcodeproj/xcshareddata/xcschemes/JetpackIntents.xcscheme +++ b/WordPress/WordPress.xcodeproj/xcshareddata/xcschemes/JetpackIntents.xcscheme @@ -1,6 +1,6 @@ diff --git a/WordPress/WordPress.xcodeproj/xcshareddata/xcschemes/WordPressAuthenticator.xcscheme b/WordPress/WordPress.xcodeproj/xcshareddata/xcschemes/WordPressAuthenticator.xcscheme index 089744643714..dcb72daccf6b 100644 --- a/WordPress/WordPress.xcodeproj/xcshareddata/xcschemes/WordPressAuthenticator.xcscheme +++ b/WordPress/WordPress.xcodeproj/xcshareddata/xcschemes/WordPressAuthenticator.xcscheme @@ -1,6 +1,6 @@ Date: Wed, 17 Sep 2025 15:07:38 -0600 Subject: [PATCH 2/9] Enable `BuildIndependentTargetsInParallel` --- WordPress/WordPress.xcodeproj/project.pbxproj | 1 + 1 file changed, 1 insertion(+) diff --git a/WordPress/WordPress.xcodeproj/project.pbxproj b/WordPress/WordPress.xcodeproj/project.pbxproj index 7b1e5becbadb..6ab8ee683c17 100644 --- a/WordPress/WordPress.xcodeproj/project.pbxproj +++ b/WordPress/WordPress.xcodeproj/project.pbxproj @@ -2785,6 +2785,7 @@ 29B97313FDCFA39411CA2CEA /* Project object */ = { isa = PBXProject; attributes = { + BuildIndependentTargetsInParallel = YES; LastSwiftUpdateCheck = 1640; LastUpgradeCheck = 2600; ORGANIZATIONNAME = WordPress; From c8367a211fb5b932c88c12278068de1154265e34 Mon Sep 17 00:00:00 2001 From: Jeremy Massel <1123407+jkmassel@users.noreply.github.com> Date: Wed, 17 Sep 2025 15:09:02 -0600 Subject: [PATCH 3/9] Enable `CLANG_ENABLE_OBJC_WEAK` --- WordPress/WordPress.xcodeproj/project.pbxproj | 3 +++ 1 file changed, 3 insertions(+) diff --git a/WordPress/WordPress.xcodeproj/project.pbxproj b/WordPress/WordPress.xcodeproj/project.pbxproj index 6ab8ee683c17..a6061cd1c14e 100644 --- a/WordPress/WordPress.xcodeproj/project.pbxproj +++ b/WordPress/WordPress.xcodeproj/project.pbxproj @@ -5140,6 +5140,7 @@ 3F47AC492A7206C000208F0D /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + CLANG_ENABLE_OBJC_WEAK = YES; CODE_SIGN_STYLE = Automatic; PRODUCT_NAME = "$(TARGET_NAME)"; }; @@ -5148,6 +5149,7 @@ 3F47AC4A2A7206C000208F0D /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + CLANG_ENABLE_OBJC_WEAK = YES; CODE_SIGN_STYLE = Automatic; PRODUCT_NAME = "$(TARGET_NAME)"; }; @@ -5156,6 +5158,7 @@ 3F47AC4C2A7206C000208F0D /* Release-Alpha */ = { isa = XCBuildConfiguration; buildSettings = { + CLANG_ENABLE_OBJC_WEAK = YES; CODE_SIGN_STYLE = Automatic; PRODUCT_NAME = "$(TARGET_NAME)"; }; From c3d5b58d36786cbf51f9a7fe1eba857c21597925 Mon Sep 17 00:00:00 2001 From: Jeremy Massel <1123407+jkmassel@users.noreply.github.com> Date: Wed, 17 Sep 2025 15:09:36 -0600 Subject: [PATCH 4/9] =?UTF-8?q?Disable=20code=20signing=20for=20targets=20?= =?UTF-8?q?that=20don=E2=80=99t=20need=20it?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WordPress/WordPress.xcodeproj/project.pbxproj | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/WordPress/WordPress.xcodeproj/project.pbxproj b/WordPress/WordPress.xcodeproj/project.pbxproj index a6061cd1c14e..3f0bb88d7413 100644 --- a/WordPress/WordPress.xcodeproj/project.pbxproj +++ b/WordPress/WordPress.xcodeproj/project.pbxproj @@ -4857,6 +4857,7 @@ CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CODE_SIGN_IDENTITY = ""; COPY_PHASE_STRIP = NO; CURRENT_PROJECT_VERSION = 1; DEFINES_MODULE = YES; @@ -4920,7 +4921,7 @@ CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CODE_SIGN_IDENTITY = "Apple Distribution: Automattic, Inc. (PZYM8XX95Q)"; + CODE_SIGN_IDENTITY = ""; COPY_PHASE_STRIP = NO; CURRENT_PROJECT_VERSION = 1; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; @@ -4980,7 +4981,7 @@ CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CODE_SIGN_IDENTITY = "iPhone Distribution: Automattic, Inc."; + CODE_SIGN_IDENTITY = ""; COPY_PHASE_STRIP = NO; CURRENT_PROJECT_VERSION = 1; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; @@ -5179,6 +5180,7 @@ CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CODE_SIGN_IDENTITY = ""; COPY_PHASE_STRIP = NO; CURRENT_PROJECT_VERSION = 1; DEFINES_MODULE = YES; @@ -5247,7 +5249,7 @@ CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CODE_SIGN_IDENTITY = "Apple Distribution: Automattic, Inc. (PZYM8XX95Q)"; + CODE_SIGN_IDENTITY = ""; COPY_PHASE_STRIP = NO; CURRENT_PROJECT_VERSION = 1; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; @@ -5312,7 +5314,7 @@ CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CODE_SIGN_IDENTITY = "iPhone Distribution: Automattic, Inc."; + CODE_SIGN_IDENTITY = ""; COPY_PHASE_STRIP = NO; CURRENT_PROJECT_VERSION = 1; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; @@ -5606,6 +5608,7 @@ CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CODE_SIGN_IDENTITY = ""; COPY_PHASE_STRIP = NO; CURRENT_PROJECT_VERSION = 1; DEFINES_MODULE = YES; @@ -5661,7 +5664,7 @@ CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CODE_SIGN_IDENTITY = "Apple Distribution: Automattic, Inc. (PZYM8XX95Q)"; + CODE_SIGN_IDENTITY = ""; COPY_PHASE_STRIP = NO; CURRENT_PROJECT_VERSION = 1; DEFINES_MODULE = YES; @@ -5712,7 +5715,7 @@ CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CODE_SIGN_IDENTITY = "iPhone Distribution: Automattic, Inc."; + CODE_SIGN_IDENTITY = ""; COPY_PHASE_STRIP = NO; CURRENT_PROJECT_VERSION = 1; DEFINES_MODULE = YES; From b231caae59879c9630176a1ced93db4eb577f5f4 Mon Sep 17 00:00:00 2001 From: Jeremy Massel <1123407+jkmassel@users.noreply.github.com> Date: Wed, 17 Sep 2025 15:21:05 -0600 Subject: [PATCH 5/9] Fix Xcode warning in LintAppLocalizedStringsUsage --- Scripts/BuildPhases/LintAppLocalizedStringsUsage.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Scripts/BuildPhases/LintAppLocalizedStringsUsage.swift b/Scripts/BuildPhases/LintAppLocalizedStringsUsage.swift index 9a29840bd00a..f3269df4d133 100755 --- a/Scripts/BuildPhases/LintAppLocalizedStringsUsage.swift +++ b/Scripts/BuildPhases/LintAppLocalizedStringsUsage.swift @@ -269,7 +269,7 @@ enum LintResult { case ok, skipped, violationsFound([(line: Int, col: Int)]) } /// Lint a given file for usages of `NSLocalizedString` instead of `AppLocalizedString` func lint(fileAt url: URL, targetName: String) throws -> LintResult { guard ["m", "swift"].contains(url.pathExtension) else { return .skipped } - let content = try String(contentsOf: url) + let content = try String(contentsOf: url, encoding: .utf8) var lineNo = 0 var violations: [(line: Int, col: Int)] = [] content.enumerateLines { line, _ in @@ -324,3 +324,4 @@ do { print("\(projectPath): error: Error while parsing the project file \(projectPath): \(error.localizedDescription)") exit(2) } + From c4fc8d336ccfda7b6d889ee5cdb81d54ddbdf133 Mon Sep 17 00:00:00 2001 From: Jeremy Massel <1123407+jkmassel@users.noreply.github.com> Date: Wed, 17 Sep 2025 15:21:14 -0600 Subject: [PATCH 6/9] Enable `STRING_CATALOG_GENERATE_SYMBOLS` --- WordPress/WordPress.xcodeproj/project.pbxproj | 3 +++ 1 file changed, 3 insertions(+) diff --git a/WordPress/WordPress.xcodeproj/project.pbxproj b/WordPress/WordPress.xcodeproj/project.pbxproj index 3f0bb88d7413..cae6411eb6cf 100644 --- a/WordPress/WordPress.xcodeproj/project.pbxproj +++ b/WordPress/WordPress.xcodeproj/project.pbxproj @@ -6690,6 +6690,7 @@ ); PRODUCT_MODULE_NAME = "$(PRODUCT_NAME:c99extidentifier)"; SDKROOT = iphoneos; + STRING_CATALOG_GENERATE_SYMBOLS = YES; SWIFT_COMPILATION_MODE = wholemodule; SWIFT_OPTIMIZATION_LEVEL = "-O"; SWIFT_TREAT_WARNINGS_AS_ERRORS = YES; @@ -6986,6 +6987,7 @@ ); PRODUCT_MODULE_NAME = "$(PRODUCT_NAME:c99extidentifier)"; SDKROOT = iphoneos; + STRING_CATALOG_GENERATE_SYMBOLS = YES; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_TREAT_WARNINGS_AS_ERRORS = YES; SWIFT_VERSION = 5.0; @@ -7038,6 +7040,7 @@ ); PRODUCT_MODULE_NAME = "$(PRODUCT_NAME:c99extidentifier)"; SDKROOT = iphoneos; + STRING_CATALOG_GENERATE_SYMBOLS = YES; SWIFT_COMPILATION_MODE = wholemodule; SWIFT_OPTIMIZATION_LEVEL = "-O"; SWIFT_TREAT_WARNINGS_AS_ERRORS = YES; From 6af63f802818a00a382c7bd343088450b8dc2b3c Mon Sep 17 00:00:00 2001 From: Jeremy Massel <1123407+jkmassel@users.noreply.github.com> Date: Wed, 17 Sep 2025 15:24:53 -0600 Subject: [PATCH 7/9] Silence AuthenticationServices concurrency warning --- .../Helpers/GoogleSignIn/NewGoogleAuthenticator.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/WordPressAuthenticator/Helpers/GoogleSignIn/NewGoogleAuthenticator.swift b/Sources/WordPressAuthenticator/Helpers/GoogleSignIn/NewGoogleAuthenticator.swift index 4548966ed31a..f6b728d57d64 100644 --- a/Sources/WordPressAuthenticator/Helpers/GoogleSignIn/NewGoogleAuthenticator.swift +++ b/Sources/WordPressAuthenticator/Helpers/GoogleSignIn/NewGoogleAuthenticator.swift @@ -1,4 +1,4 @@ -import AuthenticationServices +@preconcurrency import AuthenticationServices public class NewGoogleAuthenticator: NSObject { From cc1ac34f3204b87dd8c5b8f2f3b58d0fdb0f183c Mon Sep 17 00:00:00 2001 From: Jeremy Massel <1123407+jkmassel@users.noreply.github.com> Date: Wed, 17 Sep 2025 15:31:36 -0600 Subject: [PATCH 8/9] Fix issues using a string as an observer context Full warning: > MediaProgressCoordinator.swift:54:128 Forming 'UnsafeMutableRawPointer' to an inout variable of type String exposes the internal representation rather than the string contents. --- .../ViewRelated/Aztec/Media/MediaProgressCoordinator.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/WordPress/Classes/ViewRelated/Aztec/Media/MediaProgressCoordinator.swift b/WordPress/Classes/ViewRelated/Aztec/Media/MediaProgressCoordinator.swift index 2b9f922f1f40..9a6012fc3cba 100644 --- a/WordPress/Classes/ViewRelated/Aztec/Media/MediaProgressCoordinator.swift +++ b/WordPress/Classes/ViewRelated/Aztec/Media/MediaProgressCoordinator.swift @@ -32,7 +32,7 @@ public class MediaProgressCoordinator: NSObject { return [String: Progress]() }() - private var mediaProgressObserverContext: String = "mediaProgressObserverContext" + private static var mediaProgressObserverContext = 0 deinit { mediaGlobalProgress?.removeObserver(self, forKeyPath: #keyPath(Progress.fractionCompleted)) @@ -51,7 +51,7 @@ public class MediaProgressCoordinator: NSObject { if mediaGlobalProgress == nil { mediaGlobalProgress = Progress.discreteProgress(totalUnitCount: 0) - mediaGlobalProgress?.addObserver(self, forKeyPath: #keyPath(Progress.fractionCompleted), options: [.new], context: &mediaProgressObserverContext) + mediaGlobalProgress?.addObserver(self, forKeyPath: #keyPath(Progress.fractionCompleted), options: [.new], context: &Self.mediaProgressObserverContext) delegate?.mediaProgressCoordinatorDidStartUploading(self) } @@ -263,7 +263,7 @@ public class MediaProgressCoordinator: NSObject { public override func observeValue(forKeyPath keyPath: String?, of object: Any?, change: [NSKeyValueChangeKey: Any]?, context: UnsafeMutableRawPointer?) { guard - context == &mediaProgressObserverContext, + context == &Self.mediaProgressObserverContext, keyPath == #keyPath(Progress.fractionCompleted) else { super.observeValue(forKeyPath: keyPath, From a66ed1c323900a6c61e019f002482643913e2ab5 Mon Sep 17 00:00:00 2001 From: Jeremy Massel <1123407+jkmassel@users.noreply.github.com> Date: Wed, 17 Sep 2025 15:34:14 -0600 Subject: [PATCH 9/9] Remove use of `WKProcessPool` > Creating and using multiple instances of WKProcessPool no longer has any effect --- .../Views/WebCommentContentRenderer.swift | 18 +----------------- .../Reader/Comments/ReaderCommentsHelper.swift | 3 +-- 2 files changed, 2 insertions(+), 19 deletions(-) diff --git a/Modules/Sources/WordPressReader/Comments/Views/WebCommentContentRenderer.swift b/Modules/Sources/WordPressReader/Comments/Views/WebCommentContentRenderer.swift index d66ab967062a..2d3b03361bdf 100644 --- a/Modules/Sources/WordPressReader/Comments/Views/WebCommentContentRenderer.swift +++ b/Modules/Sources/WordPressReader/Comments/Views/WebCommentContentRenderer.swift @@ -36,26 +36,10 @@ public final class WebCommentContentRenderer: NSObject, CommentContentRenderer { private var lastReloadDate: Date? private var isReloadNeeded = false - /// A shared web view context with resources that can be reused across - /// mutliple web view instances. - @MainActor - public final class Context { - let processPool = WKProcessPool() - - public init() {} - } - // MARK: Methods - - public required override convenience init() { - self.init(context: .init()) - } - - public init(context: Context) { + public override init() { super.init() - webView.configuration.processPool = context.processPool - if #available(iOS 16.4, *) { webView.isInspectable = true } diff --git a/WordPress/Classes/ViewRelated/Reader/Comments/ReaderCommentsHelper.swift b/WordPress/Classes/ViewRelated/Reader/Comments/ReaderCommentsHelper.swift index d0772d1546c5..eb397c5867fd 100644 --- a/WordPress/Classes/ViewRelated/Reader/Comments/ReaderCommentsHelper.swift +++ b/WordPress/Classes/ViewRelated/Reader/Comments/ReaderCommentsHelper.swift @@ -6,10 +6,9 @@ import WordPressUI @MainActor @objc class ReaderCommentsHelper: NSObject { private var contentHeights: [String: CGFloat] = [:] - private let webViewContext = WebCommentContentRenderer.Context() func makeWebRenderer() -> WebCommentContentRenderer { - let renderer = WebCommentContentRenderer(context: webViewContext) + let renderer = WebCommentContentRenderer() renderer.tintColor = UIAppColor.primary return renderer }