From 1e9c9fb67f01a9a6ddb69a537191435cf9d87bfa Mon Sep 17 00:00:00 2001 From: Gauvain Date: Fri, 29 May 2026 01:27:57 +0200 Subject: [PATCH] revert(ios): drop SwiftUICore weak-link plugin (broke tvOS, no iOS fix) The -weak_framework SwiftUICore approach did NOT resolve the iOS 26 'cannot link directly with SwiftUICore' link error (auto-linked by a precompiled SwiftUI pod - @expo/ui and/or react-native-glass-effect-view, both in use), and it broke the tvOS TopShelf target (no SwiftUICore on tvOS). Restores tvOS unsigned to green. iOS phone still blocked on the SwiftUICore autolink issue - likely tied to useFrameworks:static + @expo/ui on iOS 26; needs a macOS build to iterate. [unsigned: GPG unavailable while away] --- app.json | 1 - plugins/withSwiftUICoreWeakLink.js | 55 ------------------------------ 2 files changed, 56 deletions(-) delete mode 100644 plugins/withSwiftUICoreWeakLink.js diff --git a/app.json b/app.json index 833850547..3326f4e4a 100644 --- a/app.json +++ b/app.json @@ -132,7 +132,6 @@ ], "expo-web-browser", ["./plugins/with-runtime-framework-headers.js"], - ["./plugins/withSwiftUICoreWeakLink.js"], ["./plugins/withChangeNativeAndroidTextToWhite.js"], ["./plugins/withAndroidAlertColors.js"], ["./plugins/withAndroidManifest.js"], diff --git a/plugins/withSwiftUICoreWeakLink.js b/plugins/withSwiftUICoreWeakLink.js deleted file mode 100644 index 3f7bd3cf3..000000000 --- a/plugins/withSwiftUICoreWeakLink.js +++ /dev/null @@ -1,55 +0,0 @@ -const { withPodfile } = require("expo/config-plugins"); - -// iOS 26 / Xcode 26: some pods (Liquid Glass / SwiftUI-based, e.g. -// react-native-glass-effect-view, @expo/ui) pull in SwiftUICore, which cannot -// be linked directly ("not an allowed client of it"). Weak-linking SwiftUICore -// on the app target(s) satisfies the linker. iOS-only; tvOS is unaffected. -const PATCH_START = "## >>> swiftuicore weak link"; -const PATCH_END = "## <<< swiftuicore weak link"; - -function buildPatch() { - return [ - PATCH_START, - " installer.aggregate_targets.each do |aggregate_target|", - " aggregate_target.user_project.native_targets.each do |target|", - " target.build_configurations.each do |cfg|", - " flags = cfg.build_settings['OTHER_LDFLAGS'] || '$(inherited)'", - " flags = flags.join(' ') if flags.is_a?(Array)", - " unless flags.include?('SwiftUICore')", - " cfg.build_settings['OTHER_LDFLAGS'] = flags + ' -weak_framework SwiftUICore'", - " end", - " end", - " end", - " aggregate_target.user_project.save", - " end", - PATCH_END, - ].join("\n"); -} - -module.exports = function withSwiftUICoreWeakLink(config) { - return withPodfile(config, (config) => { - let podfile = config.modResults.contents; - - if (!/^\s*post_install\s+do\s+\|installer\|/m.test(podfile)) { - podfile += "\n\npost_install do |installer|\nend\n"; - } - - const patch = buildPatch(); - - if (podfile.includes(PATCH_START)) { - podfile = podfile.replace( - new RegExp(`${PATCH_START}[\\s\\S]*?${PATCH_END}`), - patch, - ); - } else { - podfile = podfile.replace( - /^\s*post_install\s+do\s+\|installer\|.*$/m, - (match) => `${match}\n\n${patch}`, - ); - } - - console.log("✅ withSwiftUICoreWeakLink: Podfile updated"); - config.modResults.contents = podfile; - return config; - }); -};