@@ -2,52 +2,48 @@ skip_docs
22
33devices = {
44 "ios" => {
5- 15 => [ "iPhone 13 Pro (15.5)" ] ,
6- 16 => [ "iPhone 14 Pro (16.4)" ] ,
7- 17 => [ "iPhone 15 Pro (17.5)" ] ,
8- 18 => [ "iPhone 16 Pro (18.6)" ] ,
9- 26 => [ "iPhone 17 Pro (26.0)" ] ,
5+ 15 => "iPhone 13 Pro (15.5)" ,
6+ 16 => "iPhone 14 Pro (16.4)" ,
7+ 17 => "iPhone 15 Pro (17.5)" ,
8+ 18 => "iPhone 16 Pro (18.6)" ,
9+ 26 => "iPhone 17 Pro (26.0)" ,
1010 } ,
1111 "ipados" => {
12- 15 => [ "iPad Pro (11-inch) (3rd generation) (15.5)" ] ,
13- 16 => [ "iPad Pro (11-inch) (4th generation) (16.4)" ] ,
14- 17 => [ "iPad Pro 11-inch (M4) (17.5)" ] ,
15- 18 => [ "iPad Pro 11-inch (M4) (18.6)" ] ,
16- 26 => [ "iPad Pro 11-inch (M4) (26.0)" ] ,
12+ 15 => "iPad Pro (11-inch) (3rd generation) (15.5)" ,
13+ 16 => "iPad Pro (11-inch) (4th generation) (16.4)" ,
14+ 17 => "iPad Pro 11-inch (M4) (17.5)" ,
15+ 18 => "iPad Pro 11-inch (M4) (18.6)" ,
16+ 26 => "iPad Pro 11-inch (M4) (26.0)" ,
1717 } ,
1818 "tvos" => {
19- 15 => [ "Apple TV (15.4)" ] ,
20- 16 => [ "Apple TV (16.4)" ] ,
21- 17 => [ "Apple TV (17.5)" ] ,
22- 18 => [ "Apple TV (18.5)" ] ,
23- 26 => [ "Apple TV (26.0)" ] ,
19+ 15 => "Apple TV (15.4)" ,
20+ 16 => "Apple TV (16.4)" ,
21+ 17 => "Apple TV (17.5)" ,
22+ 18 => "Apple TV (18.5)" ,
23+ 26 => "Apple TV (26.0)" ,
2424 } ,
2525 "watchos" => {
26- 8 => [ "Apple Watch Series 7 (45mm) (8.5)" ] ,
27- 9 => [ "Apple Watch Series 8 (45mm) (9.4)" ] ,
28- 10 => [ "Apple Watch Series 9 (45mm) (10.5)" ] ,
29- 11 => [ "Apple Watch Series 10 (42mm) (11.5)" ] ,
30- 26 => [ "Apple Watch Series 11 (42mm) (26.0)" ] ,
26+ 8 => "Apple Watch Series 7 (45mm) (8.5)" ,
27+ 9 => "Apple Watch Series 8 (45mm) (9.4)" ,
28+ 10 => "Apple Watch Series 9 (45mm) (10.5)" ,
29+ 11 => "Apple Watch Series 10 (42mm) (11.5)" ,
30+ 26 => "Apple Watch Series 11 (42mm) (26.0)" ,
3131 } ,
3232 "visionos" => {
33- 1 => [ "Apple Vision Pro (at 2732x2048) (1.2)" ] ,
34- 2 => [ "Apple Vision Pro (at 2732x2048) (2.5)" ] ,
35- 26 => [ "Apple Vision Pro (26.0)" ] ,
33+ 1 => "Apple Vision Pro (at 2732x2048) (1.2)" ,
34+ 2 => "Apple Vision Pro (at 2732x2048) (2.5)" ,
35+ 26 => "Apple Vision Pro (26.0)" ,
3636 } ,
3737}
3838
39- before_all do |lane , options |
40- next if lane == :create_simulators
41- create_simulators ( platform : options [ :platform ] , version : options [ :version ] )
42- end
43-
4439lane :create_simulators do |options |
4540 require 'json'
4641 require 'set'
4742
4843 # map Fastfile platform keys to display names used by CoreSimulator runtimes
4944 platforms_to_os = {
5045 "ios" => "iOS" ,
46+ "ipados" => "iOS" ,
5147 "tvos" => "tvOS" ,
5248 "watchos" => "watchOS" ,
5349 "visionos" => "visionOS" ,
@@ -117,11 +113,8 @@ lane :create_simulators do |options|
117113 os_name = platforms_to_os [ platform ]
118114 next if os_name . nil?
119115
120- versions . values . flatten . each do |descriptor |
121- # descriptor examples:
122- # "iPhone 14 Pro (16.4)"
123- # "iPad Pro (11-inch) (4th generation) (16.4)"
124- # "Apple Vision Pro (2.5)"
116+ versions . values . each do |descriptor |
117+ # descriptor is a single string like "iPhone 14 Pro (16.4)" or "iPad Pro 11-inch (M4) (18.6)"
125118 begin
126119 # Parse trailing "(x.y)" and derive device name
127120 if descriptor =~ /\s *\( ([^()]+)\) \s *\z /
@@ -154,75 +147,3 @@ lane :create_simulators do |options|
154147 end
155148 end
156149end
157-
158- lane :build do |options |
159- platform = options [ :platform ] . to_s . downcase
160- version = options [ :version ] . to_i
161- scheme = options [ :scheme ] . to_s
162-
163- unless scheme == "Showcase" || scheme == "SwiftUIIntrospect"
164- raise "Unsupported scheme: #{ scheme } "
165- next
166- end
167-
168- if platform == "macos"
169- for destination in [ "platform=macOS" , "platform=macOS,variant=Mac Catalyst" ]
170- build_app (
171- scheme : scheme ,
172- destination : destination ,
173- skip_archive : true ,
174- skip_codesigning : true ,
175- skip_package_ipa : true ,
176- skip_profile_detection : true ,
177- )
178- end
179- else
180- run_tests (
181- configuration : "Debug" ,
182- build_for_testing : true ,
183- scheme : scheme ,
184- devices : devices [ platform ] [ version ] ,
185- prelaunch_simulator : false ,
186- ensure_devices_found : true ,
187- force_quit_simulator : true ,
188- disable_concurrent_testing : true ,
189- )
190- end
191- end
192-
193- lane :test do |options |
194- configuration = ( options [ :configuration ] || "Debug" ) . to_s
195- platform = options [ :platform ] . to_s . downcase
196- version = options [ :version ] . to_i
197- scheme = options [ :scheme ] . to_s
198-
199- if platform == "macos"
200- run_tests (
201- configuration : configuration ,
202- scheme : scheme ,
203- destination : "platform=macOS" ,
204- catalyst_platform : "macos" ,
205- disable_slide_to_type : false ,
206- prelaunch_simulator : false ,
207- ensure_devices_found : true ,
208- force_quit_simulator : false ,
209- disable_concurrent_testing : true ,
210- )
211- else
212- unless [ "SwiftUIIntrospectTests" ] . include? ( scheme )
213- raise "Unsupported scheme: #{ scheme } "
214- end
215- run_tests (
216- configuration : configuration ,
217- scheme : scheme ,
218- devices : devices [ platform ] [ version ] ,
219- prelaunch_simulator : false ,
220- ensure_devices_found : true ,
221- force_quit_simulator : true ,
222- reset_simulator : false ,
223- disable_concurrent_testing : true ,
224- result_bundle : true ,
225- output_directory : Dir . pwd + "/test_output" ,
226- )
227- end
228- end
0 commit comments