build_and_test.sh 469 Bytes
Newer Older
Dan Field's avatar
Dan Field committed
1 2 3 4 5 6 7
#!/bin/bash

set -e

cd "$(dirname "$0")"

pushd flutterapp
8
../../../../bin/flutter build ios --debug --simulator --no-codesign
Dan Field's avatar
Dan Field committed
9 10 11 12
popd

pod install
os_version=$(xcrun --show-sdk-version --sdk iphonesimulator)
13 14 15 16 17 18 19 20 21 22 23 24

PRETTY="cat"
if which xcpretty; then
  PRETTY="xcpretty"
fi

set -o pipefail && xcodebuild \
  -workspace ios_add2app.xcworkspace \
  -scheme ios_add2appTests \
  -sdk "iphonesimulator$os_version" \
  -destination "OS=$os_version,name=iPhone X" test | $PRETTY