Skip to content

Commit

Permalink
Future proof the simulator id selection.
Browse files Browse the repository at this point in the history
  • Loading branch information
Will James committed Mar 28, 2017
1 parent e8d8a36 commit 8f5a4de
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ before_install:
- brew outdated carthage || brew upgrade carthage
before_script:
- carthage bootstrap --platform iOS
script: xcodebuild -scheme "GuardedSwiftyJson" -destination "platform=iOS Simulator,id=22FA2149-1241-469C-BF6D-462D3837DB72" test
script: ./ci.sh
6 changes: 6 additions & 0 deletions ci.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash

set -e

SIMULATOR_ID=$(xcrun instruments -s devices | grep -m1 "iPhone 7 (10.2)" | sed -E 's/.*\[(.*)\].*/\1/')
xcodebuild -scheme "GuardedSwiftyJson" -destination "platform=iOS Simulator,id=$SIMULATOR_ID" test

0 comments on commit 8f5a4de

Please sign in to comment.