Skip to content

Instantly share code, notes, and snippets.

@josuesasilva
Created May 10, 2020 21:38
Show Gist options
  • Save josuesasilva/4b71c7a0c0d21642b9e6871374bc4c02 to your computer and use it in GitHub Desktop.
Save josuesasilva/4b71c7a0c0d21642b9e6871374bc4c02 to your computer and use it in GitHub Desktop.
Copying React Native prebuilt libraries and headers
WORKSPACE="../RNBuild"
HEADERS_SRCROOT=${SRCROOT}/Headers/Public
HEADERS_TARGETDIR=${WORKSPACE}/Headers
TARGET_DIR=${WORKSPACE}
mkdir -p ${TARGET_DIR}/{Simulator,Device,Headers,Universal}
find ${BUILD_DIR}/Debug-iphoneos -type f \( -iname "*.a" ! -iname "libPods*.a" \) -exec cp "{}" ${TARGET_DIR}/Simulator \;
find ${BUILD_DIR}/Debug-iphonesimulator -type f \( -iname "*.a" ! -iname "libPods*.a" \) -exec cp "{}" ${TARGET_DIR}/Device \;
for f in $(ls ${TARGET_DIR}/Simulator); do
lipo -create "${TARGET_DIR}/Simulator/${f}" "${TARGET_DIR}/Device/${f}" -output "${TARGET_DIR}/Universal/${f}"
done
rsync ${HEADERS_SRCROOT}/ ${HEADERS_TARGETDIR}/ -a --copy-links -v
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment