Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix lower case platform parsing
  • Loading branch information
Badlazzor committed Sep 16, 2025
commit 854d3667d8c141484f14f95b2a619b9a7c5f9384
12 changes: 9 additions & 3 deletions step/platform.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ func parsePlatform(platform string) (Platform, error) {
return watchOS, nil
case "visionos":
return visionOS, nil
case "generic/platform=iOS Simulator":
case "generic/platform=ios simulator":
return iOSSimulator, nil
case "generic/platform=watchOS Simulator":
case "generic/platform=watchos simulator":
return watchOSSimulator, nil
case "generic/platform=tvOS Simulator":
case "generic/platform=tvos simulator":
return tvOSSimulator, nil
default:
return "", fmt.Errorf("unknown platform: %s", platform)
Expand Down Expand Up @@ -168,6 +168,12 @@ func getPlatform(buildSettings serialized.Object) (Platform, error) {
case strings.HasPrefix(sdk, "xros"):
// visionOS SDK is called xros (as of Xcode 15.2), but the platform is called visionOS (e.g. in the destination specifier)
return visionOS, nil
case strings.HasPrefix(sdk, "iphonesimulator"):
return iOSSimulator, nil
case strings.HasPrefix(sdk, "watchsimulator"):
return watchOSSimulator, nil
case strings.HasPrefix(sdk, "appletvsimulator"):
return tvOSSimulator, nil
default:
return "", fmt.Errorf("unkown SDKROOT: %s", sdk)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🐛 Bug

Typo in error message: "unkown" should be "unknown"

🔄 Suggestion:

Suggested change
return "", fmt.Errorf("unkown SDKROOT: %s", sdk)
return "", fmt.Errorf("unknown SDKROOT: %s", sdk)

}
Expand Down