File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6,3 +6,4 @@ ruby ">= 2.6.10"
66gem 'cocoapods' , '1.16.2'
77gem 'cocoapods-check' , '1.1.0'
88gem 'activesupport' , '>= 6.1.7.5' , '< 7.3.0'
9+ gem 'xcpretty'
Original file line number Diff line number Diff line change 9292 nkf (0.2.0 )
9393 public_suffix (4.0.7 )
9494 rexml (3.4.1 )
95+ rouge (3.28.0 )
9596 ruby-macho (2.5.1 )
9697 securerandom (0.4.1 )
9798 typhoeus (1.4.1 )
105106 colored2 (~> 3.1 )
106107 nanaimo (~> 0.4.0 )
107108 rexml (>= 3.3.6 , < 4.0 )
109+ xcpretty (0.4.1 )
110+ rouge (~> 3.28.0 )
108111
109112PLATFORMS
110113 ruby
@@ -113,6 +116,7 @@ DEPENDENCIES
113116 activesupport (>= 6.1.7.5 , < 7.3.0 )
114117 cocoapods (= 1.16.2 )
115118 cocoapods-check (= 1.1.0 )
119+ xcpretty
116120
117121RUBY VERSION
118122 ruby 3.1.2p20
Original file line number Diff line number Diff line change 33set -ex
44set -eo pipefail
55
6- if [[ -n $CURRENT_SIMULATOR_UUID ]]; then
7- dest="id=$CURRENT_SIMULATOR_UUID"
8- else
9- dest="platform=iOS Simulator,name=iPhone 15 Pro"
10- fi
6+ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
7+ source "$SCRIPT_DIR/simulator"
8+ dest="$(get_sim_destination)"
119
1210cd ios
1311
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ # Determine an iOS Simulator destination string for xcodebuild.
4+ get_sim_destination () {
5+ if [[ -n " $CURRENT_SIMULATOR_UUID " ]]; then
6+ echo " id=$CURRENT_SIMULATOR_UUID "
7+ return
8+ fi
9+
10+ # Prefer a currently booted iOS simulator (iPhone or iPad)
11+ local udid
12+ udid=" $( xcrun simctl list devices booted \
13+ | grep -E ' iPhone|iPad' \
14+ | sed -n -E ' s/.*\(([0-9A-Fa-f-]{36})\).*/\1/p' \
15+ | head -n1) "
16+
17+ # If none booted, pick the first available iOS simulator (iPhone or iPad)
18+ if [[ -z " $udid " ]]; then
19+ udid=" $( xcrun simctl list devices available \
20+ | grep -E ' iPhone|iPad' \
21+ | sed -n -E ' s/.*\(([0-9A-Fa-f-]{36})\).*/\1/p' \
22+ | head -n1) "
23+ fi
24+
25+ if [[ -n " $udid " ]]; then
26+ echo " id=$udid "
27+ else
28+ echo " platform=iOS Simulator,name=iPhone 15 Pro"
29+ fi
30+ }
31+
32+
Original file line number Diff line number Diff line change 33set -ex
44set -eo pipefail
55
6- if [[ -n $CURRENT_SIMULATOR_UUID ]]; then
7- dest="id=$CURRENT_SIMULATOR_UUID"
8- else
9- dest="platform=iOS Simulator,name=iPhone 15 Pro"
10- fi
6+ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
7+ source "$SCRIPT_DIR/simulator"
8+ dest="$(get_sim_destination)"
119
1210cd ios
1311
You can’t perform that action at this time.
0 commit comments