From 2c58636843995fc5222d1f22c0e22cf9dfc66ef5 Mon Sep 17 00:00:00 2001 From: Gauvain Date: Fri, 29 May 2026 16:21:43 +0200 Subject: [PATCH] test(ios): Path A - keep useFrameworks:static + forceStaticLinking ExpoUI/GlassEffectView Pivot: removing useFrameworks fixed SwiftUICore but broke legacy pods (udp ), and use_modular_headers! didn't help (prebuilt React VFS). Instead keep useFrameworks:static (udp & all legacy pods keep working) and force-static-link the SwiftUI pods (ExpoUI=@expo/ui, GlassEffectView) so they stop propagating the SwiftUICore framework auto-link to the app target. forceStaticLinking is the documented expo-build-properties fix for Swift pods that break under static frameworks. [unsigned: GPG] --- app.json | 5 +++-- plugins/withModularHeaders.js | 24 ------------------------ 2 files changed, 3 insertions(+), 26 deletions(-) delete mode 100644 plugins/withModularHeaders.js diff --git a/app.json b/app.json index 083b9c602..6595cbfb6 100644 --- a/app.json +++ b/app.json @@ -78,7 +78,9 @@ "expo-build-properties", { "ios": { - "deploymentTarget": "16.4" + "deploymentTarget": "16.4", + "useFrameworks": "static", + "forceStaticLinking": ["ExpoUI", "GlassEffectView"] }, "android": { "buildArchs": ["arm64-v8a", "x86_64", "armeabi-v7a"], @@ -131,7 +133,6 @@ ], "expo-web-browser", ["./plugins/with-runtime-framework-headers.js"], - ["./plugins/withModularHeaders.js"], ["./plugins/withChangeNativeAndroidTextToWhite.js"], ["./plugins/withAndroidAlertColors.js"], ["./plugins/withAndroidManifest.js"], diff --git a/plugins/withModularHeaders.js b/plugins/withModularHeaders.js deleted file mode 100644 index 24d22123b..000000000 --- a/plugins/withModularHeaders.js +++ /dev/null @@ -1,24 +0,0 @@ -const { withPodfile } = require("expo/config-plugins"); - -// Without `useFrameworks: static`, older Obj-C pods that do `#import ` -// (e.g. react-native-udp's UdpSockets.m -> ) can't resolve the -// React umbrella. `use_modular_headers!` restores module-style header maps for all -// pods so resolves again. Inserted at the top of the main target. -const MARKER = "use_modular_headers! # streamyfin: for legacy pods"; - -module.exports = function withModularHeaders(config) { - return withPodfile(config, (config) => { - let podfile = config.modResults.contents; - - if (!podfile.includes(MARKER)) { - podfile = podfile.replace( - /^(target\s+['"][^'"]+['"]\s+do)\s*$/m, - (match) => `${match}\n ${MARKER}`, - ); - config.modResults.contents = podfile; - console.log("✅ withModularHeaders: use_modular_headers! injected"); - } - - return config; - }); -};