mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-05-31 11:08:26 +01:00
fix(ios): drop SwiftUICore autolink on pods so the app links via SwiftUI re-export
Build #9 proved `-weak_framework SwiftUICore` does NOT bypass the allowed-client check, and applying it to the tvOS app target regressed tvOS — reverted that plugin (withSwiftUICoreWeakLink). Confirmed root cause from build #8/#9 logs: both iOS jobs fail at the app *executable* link (`Ld … Streamyfin`), not at any pod. SwiftUI was split into SwiftUI + SwiftUICore on iOS 26; the SwiftUI pods emit a `-framework SwiftUICore` autolink directive that, under use_frameworks :static, is inherited by the app's static link, and the app isn't an allowed client of the private SwiftUICore.tbd. Fix: in the pod post_install, compile pods with `-Xfrontend -disable-autolink-framework -Xfrontend SwiftUICore` so they stop emitting that direct autolink. SwiftUICore symbols then resolve through SwiftUI's re-export (SwiftUI.tbd re-exports SwiftUICore). Scoped to phone (ENV['EXPO_TV'] != '1') to leave the green tvOS build untouched. Also harden scripts/ios/build-ios.ts: displayBuildError now surfaces the "Undefined symbols for architecture …" linker block, which the error:-only pattern filter was swallowing (so unsigned-build failures show the real symbol).
This commit is contained in:
@@ -525,10 +525,23 @@ function displayBuildError(
|
||||
console.error(line);
|
||||
}
|
||||
console.error("--- End Build Errors ---\n");
|
||||
} else if (stdout.trim()) {
|
||||
}
|
||||
|
||||
// Linker failures ("Undefined symbols for architecture …", the SwiftUICore
|
||||
// autolink rejection, "ld: …") don't carry an "error:" token, so the pattern
|
||||
// filter above drops the symbol name and "referenced from" context that
|
||||
// actually pinpoints the culprit. Surface that block explicitly.
|
||||
const stdoutLines = stdout.split("\n");
|
||||
const undefIdx = stdoutLines.findIndex((line: string) =>
|
||||
line.includes("Undefined symbols"),
|
||||
);
|
||||
if (undefIdx >= 0) {
|
||||
console.error("\n--- Linker error detail ---");
|
||||
console.error(stdoutLines.slice(undefIdx, undefIdx + 40).join("\n"));
|
||||
console.error("--- End linker error detail ---\n");
|
||||
} else if (errorLines.length === 0 && stdout.trim()) {
|
||||
// No specific error patterns found, show last N lines of stdout
|
||||
const lines = stdout.split("\n");
|
||||
const lastLines = lines.slice(-ERROR_OUTPUT_TAIL_LINES).join("\n");
|
||||
const lastLines = stdoutLines.slice(-ERROR_OUTPUT_TAIL_LINES).join("\n");
|
||||
console.error(
|
||||
`\n--- Last ${ERROR_OUTPUT_TAIL_LINES} lines of build output ---`,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user