Skip to content

Commit

Permalink
feat(ios): Ensure a simulator with the latest iOS version exists for …
Browse files Browse the repository at this point in the history
…the given name when testing
  • Loading branch information
matt-oakes committed Apr 21, 2020
1 parent 830659e commit 2d614fa
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/commands/ios_simulator_start.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
description: Starts an iOS simulator with the given name.
description: Creates and starts an iOS simulator with the given name.

parameters:
device:
Expand All @@ -7,6 +7,12 @@ parameters:
default: "iPhone X"

steps:
- run:
name: Remove all simulators to avoid conflicts with the one we're going to use
command: xcrun simctl list | awk -F “[()]” ‘{ for (i=2; i<NF; i+=2) print $i }’ | grep ‘^[-A-Z0–9]*$’ | xargs -I uuid xcrun simctl delete uuid
- run:
name: Create the device simulator we need
command: xcrun simctl create "<<parameters.device>>" "<<parameters.device>>"
- run:
name: Start iOS simulator (background)
background: true
Expand Down

0 comments on commit 2d614fa

Please sign in to comment.