test(ios): Path A - keep useFrameworks:static + forceStaticLinking ExpoUI/GlassEffectView

Pivot: removing useFrameworks fixed SwiftUICore but broke legacy pods (udp <React/...>), 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]
This commit is contained in:
Gauvain
2026-05-29 16:21:43 +02:00
parent d9266209d2
commit 2c58636843
2 changed files with 3 additions and 26 deletions

View File

@@ -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"],

View File

@@ -1,24 +0,0 @@
const { withPodfile } = require("expo/config-plugins");
// Without `useFrameworks: static`, older Obj-C pods that do `#import <React/...>`
// (e.g. react-native-udp's UdpSockets.m -> <React/RCTAssert.h>) can't resolve the
// React umbrella. `use_modular_headers!` restores module-style header maps for all
// pods so <React/...> resolves again. Inserted at the top of the main target.
const MARKER = "use_modular_headers! # streamyfin: <React/...> 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;
});
};