Skip to content

Commit 5ac357b

Browse files
authored
fix: duplicate symbols for ReactBrownfield (#296)
* fix: duplicate symbols for ReactBrownfield * chore: run changeset
1 parent 825e293 commit 5ac357b

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

.changeset/strict-animals-worry.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@callstack/brownfield-cli': patch
3+
---
4+
5+
fix duplicate symbols for react-brownfield

packages/cli/src/brownfield/commands/packageIos.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import fs from 'node:fs';
12
import path from 'node:path';
23

34
import {
@@ -95,6 +96,17 @@ export const packageIosCommand = curryOptions(
9596
platformConfig
9697
);
9798

99+
const reactBrownfieldXcframeworkPath = path.join(
100+
packageDir,
101+
'ReactBrownfield.xcframework'
102+
);
103+
if (fs.existsSync(reactBrownfieldXcframeworkPath)) {
104+
// Strip the binary from ReactBrownfield.xcframework to make it interface-only.
105+
// This avoids duplicate symbols when consumer apps embed both BrownfieldLib
106+
// (which contains ReactBrownfield symbols) and ReactBrownfield.xcframework.
107+
stripFrameworkBinary(reactBrownfieldXcframeworkPath);
108+
}
109+
98110
if (hasBrownie) {
99111
const productsPath = path.join(options.buildFolder, 'Build', 'Products');
100112
const brownieOutputPath = path.join(packageDir, 'Brownie.xcframework');

0 commit comments

Comments
 (0)