#!/bin/bash
set -e

if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then  
  ionic platform add ios
  ionic build ios --device --buildConfig ./cordovaBuildConfig.json
fi

if [[ "$TRAVIS_OS_NAME" != "osx" ]]; then  
  ionic platform add android
  ionic build android --device
fi
#!/bin/bash
set -e

if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then  
  ionic cordova platform add ios
  ionic cordova build ios --device --buildConfig ./cordovaBuildConfig.json
fi

if [[ "$TRAVIS_OS_NAME" != "osx" ]]; then  
  ionic cordova platform add android
  ionic cordova build android --device
fi

Update buidling script to Ionic CLI v3
Update buidling script to Ionic CLI v3