Skip to content

Commit 5897fc2

Browse files
committed
Locate and include debug symbols when creating an Xcframework
1 parent 8734465 commit 5897fc2

File tree

1 file changed

+13
-1
lines changed
  • packages/host/src/node/prebuilds

1 file changed

+13
-1
lines changed

packages/host/src/node/prebuilds/apple.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,19 @@ export async function createXCframework({
9999
"xcodebuild",
100100
[
101101
"-create-xcframework",
102-
...frameworkPaths.flatMap((p) => ["-framework", p]),
102+
...frameworkPaths.flatMap((frameworkPath) => {
103+
const debugSymbolPath = frameworkPath + ".dSYM";
104+
if (fs.existsSync(debugSymbolPath)) {
105+
return [
106+
"-framework",
107+
frameworkPath,
108+
"-debug-symbols",
109+
debugSymbolPath,
110+
];
111+
} else {
112+
return ["-framework", frameworkPath];
113+
}
114+
}),
103115
"-output",
104116
xcodeOutputPath,
105117
],

0 commit comments

Comments
 (0)