Skip to content

Commit 84d3830

Browse files
committed
Fastlane fixes
1 parent 076f656 commit 84d3830

2 files changed

Lines changed: 36 additions & 1 deletion

File tree

fastlane/Fastfile

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,41 @@
1515
# Uncomment the line if you want fastlane to automatically update itself
1616
# update_fastlane
1717

18+
# Workaround: Fastlane parses the OS version from `simctl list devices` section
19+
# headers (e.g., "iOS 26.3") and passes it as the xcodebuild destination OS.
20+
# But xcodebuild reports the full runtime version (e.g., 26.3.1), so the
21+
# name+OS destination match fails. Using the device UDID avoids this entirely.
22+
require "snapshot/test_command_generator"
23+
Snapshot::TestCommandGenerator.class_eval do
24+
class << self
25+
def destination(devices)
26+
unless verify_devices_share_os(devices)
27+
UI.user_error!("All devices provided to snapshot should run the same operating system")
28+
end
29+
return ["-destination 'platform=macOS'"] if devices.first.to_s =~ /^Mac/
30+
31+
case devices.first.to_s
32+
when /^Apple TV/ then os = "tvOS"
33+
when /^Apple Watch/ then os = "watchOS"
34+
else os = "iOS"
35+
end
36+
37+
os_version = Snapshot.config[:ios_version] || Snapshot::LatestOsVersion.version(os)
38+
39+
destinations = devices.map do |d|
40+
device = find_device(d, os_version)
41+
UI.user_error!("No device found named '#{d}' for version '#{os_version}'") if device.nil?
42+
if device.os_version != os_version
43+
UI.important("Using device named '#{device.name}' with version '#{device.os_version}' because no match was found for version '#{os_version}'")
44+
end
45+
"-destination 'platform=#{os} Simulator,id=#{device.udid}'"
46+
end
47+
48+
return [destinations.join(" ")]
49+
end
50+
end
51+
end
52+
1853
default_platform :ios
1954

2055
platform :ios do

fastlane/Snapfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ launch_arguments [
5252
]
5353

5454
# App identifier
55-
app_identifier "codes.tim.TOLD"
55+
app_identifier "codes.tim.SF50-TOLD"
5656

5757
# Concurrent simulators
5858
concurrent_simulators false

0 commit comments

Comments
 (0)