From e4b0161d15f68109b43cd4986e467520697330ff Mon Sep 17 00:00:00 2001 From: Gauvain Date: Fri, 29 May 2026 18:51:52 +0200 Subject: [PATCH] fix(ios): patch react-native-ios-utilities for RN 0.85 prebuilt React MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit With SwiftUICore resolved (prev commit), the app link surfaced the real blocker: `Undefined symbols: _OBJC_CLASS_$_RCTRootContentView`, referenced from react-native-ios-utilities (RCTView+Helpers.o). RCTRootContentView is a legacy paper class that the prebuilt new-architecture React in RN 0.85 no longer exports. ios-utilities@5.2.0 is the latest release and still references it, so no version bump fixes this. Patch the single offending helper (closestParentReactContentView) to return nil with an RCTView? type, dropping the only RCTRootContentView reference in the pod. It feeds only the last-resort touch-handler fallback, moot under the new arch. Nothing else (incl. react-native-ios-context-menu) references it. NOTE: react-native-ios-utilities + react-native-ios-context-menu (both Dominic's, latest 5.2.0 / 3.2.1) are effectively unmaintained for RN 0.85 — candidates for removal/replacement (context-menu is used only in DiscoverFilters.tsx), like udp. --- .../react-native-ios-utilities@5.2.0.patch | 28 +++++++++++++++++++ bun.lock | 1 + package.json | 3 +- 3 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 bun-patches/react-native-ios-utilities@5.2.0.patch diff --git a/bun-patches/react-native-ios-utilities@5.2.0.patch b/bun-patches/react-native-ios-utilities@5.2.0.patch new file mode 100644 index 000000000..4659493ba --- /dev/null +++ b/bun-patches/react-native-ios-utilities@5.2.0.patch @@ -0,0 +1,28 @@ +diff --git a/ios/Sources/Extensions+Helpers/RCTView+Helpers.swift b/ios/Sources/Extensions+Helpers/RCTView+Helpers.swift +index 09be306d5aa39337c5114c2ad6ba7513218e0751..24ff8ee2c36fef8632a7e012514fd04db9bf89fd 100644 +--- a/ios/Sources/Extensions+Helpers/RCTView+Helpers.swift ++++ b/ios/Sources/Extensions+Helpers/RCTView+Helpers.swift +@@ -25,15 +25,14 @@ public extension RCTView { + return rootView.recursivelyFindSubview(whereType: targetType); + }; + +- var closestParentReactContentView: RCTRootContentView? { +- let targetType = RCTRootContentView.self; +- +- if let match = self.recursivelyFindParentView(whereType: targetType) { +- return match; +- }; +- +- guard let rootView = self.rootViewForCurrentWindow else { return nil }; +- return rootView.recursivelyFindSubview(whereType: targetType); ++ // PATCH (streamyfin): RCTRootContentView is a legacy paper class that the prebuilt ++ // new-architecture React (RN 0.85) does not export, so any reference to it fails to ++ // link (Undefined symbols: _OBJC_CLASS_$_RCTRootContentView). The app runs the new ++ // architecture, where this content-view lookup is unused; short-circuit to nil. ++ // Return type widened to RCTView? so the caller's `.reactTouchHandlers` (an RCTView ++ // extension) still resolves. ++ var closestParentReactContentView: RCTView? { ++ return nil; + }; + + var reactTouchHandlers: [RCTTouchHandler]? { diff --git a/bun.lock b/bun.lock index b9546e2ac..cad38e06e 100644 --- a/bun.lock +++ b/bun.lock @@ -115,6 +115,7 @@ }, }, "patchedDependencies": { + "react-native-ios-utilities@5.2.0": "bun-patches/react-native-ios-utilities@5.2.0.patch", "react-native-udp@4.1.7": "bun-patches/react-native-udp@4.1.7.patch", "react-native-bottom-tabs@1.2.0": "bun-patches/react-native-bottom-tabs@1.2.0.patch", }, diff --git a/package.json b/package.json index ca7b49a0d..bef7d6003 100644 --- a/package.json +++ b/package.json @@ -165,6 +165,7 @@ ], "patchedDependencies": { "react-native-udp@4.1.7": "bun-patches/react-native-udp@4.1.7.patch", - "react-native-bottom-tabs@1.2.0": "bun-patches/react-native-bottom-tabs@1.2.0.patch" + "react-native-bottom-tabs@1.2.0": "bun-patches/react-native-bottom-tabs@1.2.0.patch", + "react-native-ios-utilities@5.2.0": "bun-patches/react-native-ios-utilities@5.2.0.patch" } }