Skip to content

Commit b497533

Browse files
committed
Reverted unneeded change after adding exceptions
Tried to build some smartness in last comitt - not working in a generic way so I reverted it. This is handled by the exception in header-config.js instead.
1 parent 131f658 commit b497533

1 file changed

Lines changed: 4 additions & 11 deletions

File tree

  • packages/react-native/scripts/ios-prebuild

packages/react-native/scripts/ios-prebuild/vfs.js

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -216,17 +216,10 @@ function createVFSOverlayContents(rootFolder /*: string */) /*: VFSOverlay */ {
216216
key = `${podSpecName}/${key}`;
217217
}
218218

219-
// The external-contents path uses the full target path because headers are copied
220-
// with their directory structure preserved in the XCFramework's root Headers folder
221-
// (see xcframework.js where headerFile.target is used).
222-
// Avoid double-nesting when target already starts with the pod name
223-
// e.g., ReactCommon/AString.h should not become ReactCommon/ReactCommon/AString.h
224-
const targetFirstDir = toPosix(header.target).split('/')[0];
225-
const targetPath =
226-
targetFirstDir === podSpecName
227-
? toPosix(header.target)
228-
: `${podSpecName}/${toPosix(header.target)}`;
229-
const sourcePath = `${ROOT_PATH_PLACEHOLDER}/Headers/${targetPath}`;
219+
// The external-contents path is always podSpecName + header.target because
220+
// xcframework.js copies headers to: outputHeadersPath/podSpecName/headerFile.target
221+
// So the VFS must point to that same location.
222+
const sourcePath = `${ROOT_PATH_PLACEHOLDER}/Headers/${podSpecName}/${toPosix(header.target)}`;
230223

231224
mappings.push({
232225
key,

0 commit comments

Comments
 (0)