Skip to content

Commit 88712ba

Browse files
minor change
1 parent 7a9a468 commit 88712ba

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

sdk/runanywhere-commons/scripts/build-ios.sh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,7 @@ create_xcframework() {
351351
local PLATFORM_DIR="${BUILD_DIR}/${PLATFORM}"
352352
local FRAMEWORK_DIR="${PLATFORM_DIR}/${FRAMEWORK_NAME}.framework"
353353

354+
rm -rf "${FRAMEWORK_DIR}"
354355
mkdir -p "${FRAMEWORK_DIR}/Headers"
355356
mkdir -p "${FRAMEWORK_DIR}/Modules"
356357

@@ -376,11 +377,11 @@ create_xcframework() {
376377

377378
cp "${LIB_PATH}" "${FRAMEWORK_DIR}/${FRAMEWORK_NAME}"
378379

379-
# Copy headers
380+
# Copy headers (flatten rac/subdir/header.h paths to flat includes)
380381
if [[ "$FRAMEWORK_NAME" == "RACommons" ]]; then
381382
find "${PROJECT_ROOT}/include/rac" -name "*.h" | while read -r header; do
382383
local filename=$(basename "$header")
383-
sed -e 's|#include "rac/[^"]*\/\([^"]*\)"|#include <RACommons/\1>|g' \
384+
sed -e 's|#include "rac/[^"]*\/\([^"]*\)"|#include "\1"|g' \
384385
"$header" > "${FRAMEWORK_DIR}/Headers/${filename}"
385386
done
386387
else
@@ -433,7 +434,7 @@ EOF
433434
done
434435

435436
# SIMULATOR already contains universal binary (arm64 + x86_64)
436-
# No need to create fat binary as both SIMULATORARM64 and SIMULATOR have arm64
437+
local SIM_FAT="${BUILD_DIR}/SIMULATOR"
437438

438439
# Create XCFramework using library format (prevents SPM from embedding static libs)
439440
local XCFW_PATH="${DIST_DIR}/${FRAMEWORK_NAME}.xcframework"
@@ -486,6 +487,7 @@ create_backend_xcframework() {
486487
local PLATFORM_DIR="${BUILD_DIR}/${PLATFORM}"
487488
local FRAMEWORK_DIR="${PLATFORM_DIR}/${FRAMEWORK_NAME}.framework"
488489

490+
rm -rf "${FRAMEWORK_DIR}"
489491
mkdir -p "${FRAMEWORK_DIR}/Headers"
490492
mkdir -p "${FRAMEWORK_DIR}/Modules"
491493

@@ -624,7 +626,7 @@ EOF
624626
fi
625627

626628
# SIMULATOR already contains universal binary (arm64 + x86_64)
627-
# No need to create fat binary as both SIMULATORARM64 and SIMULATOR have arm64
629+
local SIM_FAT="${BUILD_DIR}/SIMULATOR"
628630

629631
# Create XCFramework using library format (prevents SPM from embedding static libs)
630632
local XCFW_PATH="${DIST_DIR}/${FRAMEWORK_NAME}.xcframework"

0 commit comments

Comments
 (0)