diff options
Diffstat (limited to 'platform/ios/framework/strip-frameworks.sh')
-rwxr-xr-x | platform/ios/framework/strip-frameworks.sh | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/platform/ios/framework/strip-frameworks.sh b/platform/ios/framework/strip-frameworks.sh index 5e0dc0e178..895cc24d5e 100755 --- a/platform/ios/framework/strip-frameworks.sh +++ b/platform/ios/framework/strip-frameworks.sh @@ -35,9 +35,19 @@ code_sign() { /usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} --preserve-metadata=identifier,entitlements "$1" } -echo "Stripping frameworks" +# Set working directory to product’s embedded frameworks cd "${BUILT_PRODUCTS_DIR}/${FRAMEWORKS_FOLDER_PATH}" +if [ "$ACTION" = "install" ]; then + echo "Copy .bcsymbolmap files to .xcarchive" + find . -name '*.bcsymbolmap' -type f -exec mv {} "${CONFIGURATION_BUILD_DIR}" \; +else + # Delete *.bcsymbolmap files from framework bundle unless archiving + find . -name '*.bcsymbolmap' -type f -exec rm -rf "{}" +\; +fi + +echo "Stripping frameworks" + for file in $(find . -type f -perm +111); do # Skip non-dynamic libraries if ! [[ "$(file "$file")" == *"dynamically linked shared library"* ]]; then @@ -61,14 +71,6 @@ for file in $(find . -type f -perm +111); do fi done -if [ "$ACTION" = "install" ]; then - echo "Copy .bcsymbolmap files to .xcarchive" - find . -name '*.bcsymbolmap' -type f -exec mv {} "${CONFIGURATION_BUILD_DIR}" \; -else - # Delete *.bcsymbolmap files from framework bundle unless archiving - find . -name '*.bcsymbolmap' -type f -exec rm -rf "{}" +\; -fi - # When this script finishes executing, delete itself from the built product function finish { if [[ $0 == "${BUILT_PRODUCTS_DIR}"* ]]; then |