@@ -28,23 +28,27 @@ matrix:
2828language : objective-c
2929cache : cocoapods
3030podfile : Example/Podfile
31+
3132before_install :
32- - gem install cocoapods # Since Travis is not always on latest version
33- - gem update xcodeproj # https://github.com/CocoaPods/CocoaPods/issues/7835
34- - pod install --repo-update --project-directory=Example
35- # Grepping destination device udid
36- - DESTINATION_UDID=$(instruments -s devices | grep "$DESTINATION \[" | sed -E 's/.*\[([0-9A-F-]+)\].*/\1/g')
37- # Prelaunching simulator to avoid timeout https://github.com/travis-ci/travis-ci/issues/6422
38- # (not working with osx_image: xcode10 and newer?)
39- # - open -a "simulator" --args -CurrentDeviceUDID $DESTINATION_UDID
33+ - gem install cocoapods # Since Travis is not always on latest version
34+ - gem update xcodeproj # https://github.com/CocoaPods/CocoaPods/issues/7835
35+ - pod install --repo-update --project-directory=Example
36+ # Grepping destination device udid
37+ - DESTINATION_UDID=$(instruments -s devices | grep "$DESTINATION \[" | sed -E 's/.*\[([0-9A-F-]+)\].*/\1/g')
38+ # Prelaunching simulator to avoid timeout https://github.com/travis-ci/travis-ci/issues/6422
39+ # (not working with osx_image: xcode10 and newer?)
40+ - if [ ${SWIFT_VERSION} = "4.0" ]; then
41+ open -a Simulator --args -CurrentDeviceUDID $DESTINATION_UDID;
42+ fi
43+
4044script :
41- - set -o pipefail && xcodebuild test
45+ - set -o pipefail && xcodebuild test
4246 ` ` -enableCodeCoverage YES
4347 ` ` -workspace Example/CollectionViewCenteredFlowLayout.xcworkspace
4448 ` ` -scheme Example
4549 ` ` -sdk iphonesimulator
4650 ` ` -destination "id=$DESTINATION_UDID"
4751 ` ` ONLY_ACTIVE_ARCH=NO
4852 ` ` | xcpretty
49- - echo $SWIFT_VERSION > .swift-version
50- - pod lib lint
53+ - echo $SWIFT_VERSION > .swift-version
54+ - pod lib lint
0 commit comments