diff --git a/contrib/mobile/utils/ios_build.sh b/contrib/mobile/utils/ios_build.sh
index 5a114973dd1b6db5c6495413ce27cb8f4cf390e5..4e358f32577f7976002f97a45e744dae09a95796 100755
--- a/contrib/mobile/utils/ios_build.sh
+++ b/contrib/mobile/utils/ios_build.sh
@@ -34,7 +34,7 @@ mkdir -p $gmsh_svn/build_ios
 cd $gmsh_svn/build_ios
 cmake $cmake_default -DENABLE_BLAS_LAPACK=1 -DENABLE_BUILD_LIB=1 -DENABLE_MATHEX=1 -DENABLE_MESH=1 -DENABLE_ONELAB=1 -DENABLE_PARSER=1 -DENABLE_POST=1 -DENABLE_ANN=1 -DENABLE_TETGEN=1 -DENABLE_KBIPACK=1 -DENABLE_GMP=0 -DENABLE_ZIPPER=1 ..
 check
-$build_cmd OTHER_CPLUSPLUSFLAGS="-miphoneos-version-min=7.0 -fembed-bitcode"
+$build_cmd OTHER_CFLAGS="-miphoneos-version-min=7.0 -fembed-bitcode" OTHER_CPLUSPLUSFLAGS="-miphoneos-version-min=7.0 -fembed-bitcode"
 check
 $headers_cmd
 mkdir -p $gmsh_framework/Headers
@@ -49,7 +49,7 @@ mkdir -p $getdp_svn/build_ios
 cd $getdp_svn/build_ios
 PETSC_DIR= PETSC_ARCH= SLEPC_DIR= cmake $cmake_default -DENABLE_BLAS_LAPACK=1 -DENABLE_BUILD_LIB=1 -DENABLE_GMSH=1 -DENABLE_LEGACY=1 -DENABLE_PETSC=1 -DPETSC_INC="$petsc_framework/Headers/" -DPETSC_LIBS="$petsc_framework/petsc" -DENABLE_SLEPC=1 -DSLEPC_INC="$slepc_framework/Headers/" -DSLEPC_LIB="$slepc_framework/slepc" -DGMSH_INC="$gmsh_framework/Headers/" -DGMSH_LIB="$gmsh_framework/Gmsh" ..
 check
-$build_cmd OTHER_CPLUSPLUSFLAGS="-miphoneos-version-min=7.0 -fembed-bitcode"
+$build_cmd OTHER_CFLAGS="-miphoneos-version-min=7.0 -fembed-bitcode" OTHER_CPLUSPLUSFLAGS="-miphoneos-version-min=7.0 -fembed-bitcode"
 check
 $headers_cmd
 mkdir -p $getdp_framework/Headers
diff --git a/contrib/mobile/utils/iossimulator_build.sh b/contrib/mobile/utils/iossimulator_build.sh
index 34bdf46bf2579bfa6b594ab1c16de383f6cb07a1..e48afb8e9aa858ee503c8654a5ad3947ebf7a416 100755
--- a/contrib/mobile/utils/iossimulator_build.sh
+++ b/contrib/mobile/utils/iossimulator_build.sh
@@ -17,7 +17,7 @@ getdp_framework="$frameworks_dir/GetDP.framework"
 
 cmake_default="-DDEFAULT=0 -DCMAKE_TOOLCHAIN_FILE=$gmsh_svn/contrib/mobile/utils/iOS.cmake -DIOS_PLATFORM=SIMULATOR -DENABLE_BUILD_IOS=1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_ARCHITECTURES=i386;x86_64 -GXcode"
 
-build_cmd="xcodebuild -target lib -configuration Release OTHER_CPLUSPLUSFLAGS=\"-mios-simulator-version-min=7.0\""
+build_cmd="xcodebuild -target lib -configuration Release"
 headers_cmd="xcodebuild -target get_headers -configuration Release"
 
 function check {
@@ -34,7 +34,7 @@ mkdir -p $gmsh_svn/build_iossimulator
 cd $gmsh_svn/build_iossimulator
 cmake $cmake_default -DENABLE_BLAS_LAPACK=1 -DENABLE_BUILD_LIB=1 -DENABLE_MATHEX=1 -DENABLE_MESH=1 -DENABLE_ONELAB=1 -DENABLE_PARSER=1 -DENABLE_POST=1 -DENABLE_ANN=1 -DENABLE_TETGEN=1 -DENABLE_KBIPACK=1 -DENABLE_GMP=0 -DENABLE_ZIPPER=1 ..
 check
-$build_cmd
+$build_cmd OTHER_CFLAGS="-mios-simulator-version-min=7.0" OTHER_CPLUSPLUSFLAGS="-mios-simulator-version-min=7.0"
 check
 $headers_cmd
 mkdir -p $gmsh_framework/Headers
@@ -49,7 +49,7 @@ mkdir -p $getdp_svn/build_iossimulator
 cd $getdp_svn/build_iossimulator
 PETSC_DIR= PETSC_ARCH= SLEPC_DIR= cmake $cmake_default -DENABLE_BLAS_LAPACK=1 -DENABLE_BUILD_LIB=1 -DENABLE_GMSH=1 -DENABLE_LEGACY=1 -DENABLE_PETSC=1 -DPETSC_INC="$petsc_framework/Headers/" -DPETSC_LIBS="$petsc_framework/petsc" -DENABLE_SLEPC=1 -DSLEPC_INC="$slepc_framework/Headers/" -DSLEPC_LIB="$slepc_framework/slepc" -DGMSH_INC="$gmsh_framework/Headers/" -DGMSH_LIB="$gmsh_framework/Gmsh" ..
 check
-$build_cmd
+$build_cmd OTHER_CFLAGS="-mios-simulator-version-min=7.0" OTHER_CPLUSPLUSFLAGS="-mios-simulator-version-min=7.0"
 check
 $headers_cmd
 mkdir -p $getdp_framework/Headers