Skip to content
This repository was archived by the owner on Feb 26, 2026. It is now read-only.

Commit fa5abc8

Browse files
FelixLisczykclaude
andcommitted
Add askForAppToLaunch property to RunAction and ProfileAction
Support the "Ask on Launch" scheme option by adding a Bool property to both action models, enabling downstream scheme generators to set askForAppToLaunch="Yes" in .xcscheme files. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent dd1a444 commit fa5abc8

4 files changed

Lines changed: 12 additions & 0 deletions

File tree

Sources/XcodeGraph/Models/ProfileAction.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ public struct ProfileAction: Equatable, Codable, Sendable {
88
public let preActions: [ExecutionAction]
99
public let postActions: [ExecutionAction]
1010
public let executable: TargetReference?
11+
public let askForAppToLaunch: Bool
1112
public let arguments: Arguments?
1213

1314
// MARK: - Init
@@ -17,12 +18,14 @@ public struct ProfileAction: Equatable, Codable, Sendable {
1718
preActions: [ExecutionAction] = [],
1819
postActions: [ExecutionAction] = [],
1920
executable: TargetReference? = nil,
21+
askForAppToLaunch: Bool = false,
2022
arguments: Arguments? = nil
2123
) {
2224
self.configurationName = configurationName
2325
self.preActions = preActions
2426
self.postActions = postActions
2527
self.executable = executable
28+
self.askForAppToLaunch = askForAppToLaunch
2629
self.arguments = arguments
2730
}
2831
}
@@ -35,13 +38,15 @@ public struct ProfileAction: Equatable, Codable, Sendable {
3538
postActions: [ExecutionAction] = [],
3639
// swiftlint:disable:next force_try
3740
executable: TargetReference? = TargetReference(projectPath: try! AbsolutePath(validating: "/Project"), name: "App"),
41+
askForAppToLaunch: Bool = false,
3842
arguments: Arguments? = Arguments.test()
3943
) -> ProfileAction {
4044
ProfileAction(
4145
configurationName: configurationName,
4246
preActions: preActions,
4347
postActions: postActions,
4448
executable: executable,
49+
askForAppToLaunch: askForAppToLaunch,
4550
arguments: arguments
4651
)
4752
}

Sources/XcodeGraph/Models/RunAction.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ public struct RunAction: Equatable, Codable, Sendable {
1616
public let diagnosticsOptions: SchemeDiagnosticsOptions
1717
public let metalOptions: MetalOptions?
1818
public let expandVariableFromTarget: TargetReference?
19+
public let askForAppToLaunch: Bool
1920
public let launchStyle: LaunchStyle
2021
public let appClipInvocationURL: URL?
2122
public var customWorkingDirectory: AbsolutePath?
@@ -36,6 +37,7 @@ public struct RunAction: Equatable, Codable, Sendable {
3637
diagnosticsOptions: SchemeDiagnosticsOptions,
3738
metalOptions: MetalOptions? = nil,
3839
expandVariableFromTarget: TargetReference? = nil,
40+
askForAppToLaunch: Bool = false,
3941
launchStyle: LaunchStyle = .automatically,
4042
appClipInvocationURL: URL? = nil,
4143
customWorkingDirectory: AbsolutePath? = nil,
@@ -53,6 +55,7 @@ public struct RunAction: Equatable, Codable, Sendable {
5355
self.diagnosticsOptions = diagnosticsOptions
5456
self.metalOptions = metalOptions
5557
self.expandVariableFromTarget = expandVariableFromTarget
58+
self.askForAppToLaunch = askForAppToLaunch
5659
self.launchStyle = launchStyle
5760
self.appClipInvocationURL = appClipInvocationURL
5861
self.customWorkingDirectory = customWorkingDirectory
@@ -81,6 +84,7 @@ public struct RunAction: Equatable, Codable, Sendable {
8184
apiValidation: true
8285
),
8386
expandVariableFromTarget: TargetReference? = nil,
87+
askForAppToLaunch: Bool = false,
8488
launchStyle: LaunchStyle = .automatically,
8589
appClipInvocationURL: URL? = nil,
8690
customWorkingDirectory: AbsolutePath? = nil,
@@ -99,6 +103,7 @@ public struct RunAction: Equatable, Codable, Sendable {
99103
diagnosticsOptions: diagnosticsOptions,
100104
metalOptions: metalOptions,
101105
expandVariableFromTarget: expandVariableFromTarget,
106+
askForAppToLaunch: askForAppToLaunch,
102107
launchStyle: launchStyle,
103108
appClipInvocationURL: appClipInvocationURL,
104109
customWorkingDirectory: customWorkingDirectory,

Tests/XcodeGraphTests/Models/ProfileActionTests.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ final class ProfileActionTests: XCTestCase {
1313
projectPath: try! AbsolutePath(validating: "/path/to/project"),
1414
name: "name"
1515
),
16+
askForAppToLaunch: true,
1617
arguments: .init(
1718
environmentVariables: [
1819
"key": EnvironmentVariable(value: "value", isEnabled: true),

Tests/XcodeGraphTests/Models/RunActionTests.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ final class RunActionTests: XCTestCase {
3232
mainThreadCheckerEnabled: true,
3333
performanceAntipatternCheckerEnabled: true
3434
),
35+
askForAppToLaunch: true,
3536
appClipInvocationURL: URL(string: "https://app-clips-url.com/example")
3637
)
3738

0 commit comments

Comments
 (0)