diff --git a/platform/ios/framework/strip-frameworks.sh b/platform/ios/framework/strip-frameworks.sh index 9deb404ca..5e0dc0e17 100755 --- a/platform/ios/framework/strip-frameworks.sh +++ b/platform/ios/framework/strip-frameworks.sh @@ -68,3 +68,12 @@ 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 + rm -f $0; + fi +} + +trap finish EXIT