diff --git a/src/objective-c/tests/build_example_test.sh b/src/objective-c/tests/build_example_test.sh
index ea262c61f40b594400ccf9b2603f1f1adfc58682..756475c9322da6be9b45eb068a14bb020594e7dd 100755
--- a/src/objective-c/tests/build_example_test.sh
+++ b/src/objective-c/tests/build_example_test.sh
@@ -31,7 +31,7 @@
 # Don't run this script standalone. Instead, run from the repository root:
 # ./tools/run_tests/run_tests.py -l objc
 
-set -eo pipefail
+set -evo pipefail
 
 cd `dirname $0`
 
@@ -47,6 +47,8 @@ SCHEME=AuthSample                               \
   EXAMPLE_PATH=examples/objective-c/auth_sample \
   ./build_one_example.sh
 
+rm -f ../examples/RemoteTestClient/*.{h,m}
+
 SCHEME=Sample                                  \
   EXAMPLE_PATH=src/objective-c/examples/Sample \
   ./build_one_example.sh
diff --git a/src/objective-c/tests/build_one_example.sh b/src/objective-c/tests/build_one_example.sh
index 24fb8b7bab44df34a5c5bccd7884b9f53843bd19..9fef6582a38b524e5383c605a0ebfdd1e7959819 100755
--- a/src/objective-c/tests/build_one_example.sh
+++ b/src/objective-c/tests/build_one_example.sh
@@ -31,7 +31,7 @@
 # Don't run this script standalone. Instead, run from the repository root:
 # ./tools/run_tests/run_tests.py -l objc
 
-set -e
+set -ev
 
 # Params:
 # EXAMPLE_PATH - directory of the example
@@ -54,7 +54,7 @@ pod install
 set -o pipefail
 XCODEBUILD_FILTER='(^===|^\*\*|\bfatal\b|\berror\b|\bwarning\b|\bfail)'
 xcodebuild \
-    clean build \
+    build \
     -workspace *.xcworkspace \
     -scheme $SCHEME \
     -destination name="iPhone 6" \
diff --git a/src/objective-c/tests/build_tests.sh b/src/objective-c/tests/build_tests.sh
index 0afa819db23eaa2630d8f78723dc4e37d857615e..bc5bc0449436d59571f6548627563c6d76cbd21b 100755
--- a/src/objective-c/tests/build_tests.sh
+++ b/src/objective-c/tests/build_tests.sh
@@ -44,5 +44,10 @@ hash xcodebuild 2>/dev/null || {
     exit 1
 }
 
+# clean the directory
+rm -rf Pods
+rm -rf Tests.xcworkspace
+rm -f Podfile.lock
+rm -f RemoteTestClient/*.{h,m}
 
 pod install
diff --git a/src/objective-c/tests/run_tests.sh b/src/objective-c/tests/run_tests.sh
index 9ad2aa1ca7561eb4aaa9de728d0ce3dbddf6f9c8..a265149f488a362971acd399fb3633e777bdefc2 100755
--- a/src/objective-c/tests/run_tests.sh
+++ b/src/objective-c/tests/run_tests.sh
@@ -31,7 +31,7 @@
 # Don't run this script standalone. Instead, run from the repository root:
 # ./tools/run_tests/run_tests.py -l objc
 
-set -e
+set -ev
 
 cd $(dirname $0)