diff --git a/scripts/objc-test-ios.sh b/scripts/objc-test-ios.sh index 6677e9cb21d..f6db784d99b 100755 --- a/scripts/objc-test-ios.sh +++ b/scripts/objc-test-ios.sh @@ -9,7 +9,7 @@ cd $ROOT XCODE_PROJECT="Examples/UIExplorer/UIExplorer.xcodeproj" XCODE_SCHEME="UIExplorer" XCODE_SDK="iphonesimulator" -if [ -z "$XCODE_DESTINATION" ]; then +if [ -z ${XCODE_DESTINATION+x} ]; then XCODE_DESTINATION="platform=iOS Simulator,name=iPhone 5s,OS=10.0" fi diff --git a/scripts/objc-test-tvos.sh b/scripts/objc-test-tvos.sh index 41c1b93d56f..039d0df9987 100755 --- a/scripts/objc-test-tvos.sh +++ b/scripts/objc-test-tvos.sh @@ -10,7 +10,7 @@ cd $ROOT XCODE_PROJECT="Examples/UIExplorer/UIExplorer.xcodeproj" XCODE_SCHEME="UIExplorer-tvOS" XCODE_SDK="appletvsimulator" -if [ -z "$XCODE_DESTINATION" ]; then +if [ -z ${XCODE_DESTINATION+x} ]; then XCODE_DESTINATION="platform=tvOS Simulator,name=Apple TV 1080p,OS=9.2" fi diff --git a/scripts/objc-test.sh b/scripts/objc-test.sh index c3fa20f5630..d9dda1a7fd2 100755 --- a/scripts/objc-test.sh +++ b/scripts/objc-test.sh @@ -34,9 +34,17 @@ fi # TODO: We use xcodebuild because xctool would stall when collecting info about # the tests before running them. Switch back when this issue with xctool has # been resolved. -xcodebuild \ - -project $XCODE_PROJECT \ - -scheme $XCODE_SCHEME \ - -sdk $XCODE_SDK \ - -destination "$XCODE_DESTINATION" \ - $XCODE_BUILD_STEPS +if [ -n "$XCODE_DESTINATION" ]; then + xcodebuild \ + -project $XCODE_PROJECT \ + -scheme $XCODE_SCHEME \ + -sdk $XCODE_SDK \ + -destination "$XCODE_DESTINATION" \ + $XCODE_BUILD_STEPS +else + xcodebuild \ + -project $XCODE_PROJECT \ + -scheme $XCODE_SCHEME \ + -sdk $XCODE_SDK \ + $XCODE_BUILD_STEPS +fi