1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27# references:
# * http://www.objc.io/issue-6/travis-ci.html
# * https://github.com/supermarin/xcpretty#usage
language: objective-c
osx_image: xcode8.1
sudo: false
## Create a build matrix to execute against multiple simulators/iOS versions
## The UDID will be used below to determin the destination to test against
## where the script section will be run once for each definition
## ISO_DEVICE is not used in the script but is useful to know what OS version is tested and will show up in Travis to make it easer to read
env:
- UDID="808A0798-21A1-4579-B15E-DA3CC5782582", IOS_DEVICE="iPhone 6 (9.3)"
- UDID="9464677E-9962-4C3B-91E8-C969B6337A68", IOS_DEVICE="iPhone 7 (10.1)"
### Setting up the simulator for auto-test and running the build via the xcodebuild tool:
script:
# The xcrun with devices here will print out a list of available devices you can snag the UDIDs for
- xcrun instruments -s devices
- echo staring build and test...
- open -a "simulator" --args -CurrentDeviceUDID $UDID
# suggestion from https://github.com/travis-ci/travis-ci/issues/6675 for exit code 65 failure
- travis_retry xcodebuild test -workspace Example/MyLibrary.xcworkspace -scheme MyLibrary-Example -configuration Debug -sdk iphonesimulator -destination "platform=iOS Simulator,id=$UDID"
- osascript -e 'tell app "Simulator" to quit'
- pod lib lint