diff --git a/Sources/XcodeGraph/Models/ProfileAction.swift b/Sources/XcodeGraph/Models/ProfileAction.swift index 1699b6df..675663ff 100644 --- a/Sources/XcodeGraph/Models/ProfileAction.swift +++ b/Sources/XcodeGraph/Models/ProfileAction.swift @@ -8,6 +8,7 @@ public struct ProfileAction: Equatable, Codable, Sendable { public let preActions: [ExecutionAction] public let postActions: [ExecutionAction] public let executable: TargetReference? + public let askForAppToLaunch: Bool public let arguments: Arguments? // MARK: - Init @@ -17,12 +18,14 @@ public struct ProfileAction: Equatable, Codable, Sendable { preActions: [ExecutionAction] = [], postActions: [ExecutionAction] = [], executable: TargetReference? = nil, + askForAppToLaunch: Bool = false, arguments: Arguments? = nil ) { self.configurationName = configurationName self.preActions = preActions self.postActions = postActions self.executable = executable + self.askForAppToLaunch = askForAppToLaunch self.arguments = arguments } } @@ -35,6 +38,7 @@ public struct ProfileAction: Equatable, Codable, Sendable { postActions: [ExecutionAction] = [], // swiftlint:disable:next force_try executable: TargetReference? = TargetReference(projectPath: try! AbsolutePath(validating: "/Project"), name: "App"), + askForAppToLaunch: Bool = false, arguments: Arguments? = Arguments.test() ) -> ProfileAction { ProfileAction( @@ -42,6 +46,7 @@ public struct ProfileAction: Equatable, Codable, Sendable { preActions: preActions, postActions: postActions, executable: executable, + askForAppToLaunch: askForAppToLaunch, arguments: arguments ) } diff --git a/Sources/XcodeGraph/Models/RunAction.swift b/Sources/XcodeGraph/Models/RunAction.swift index 400e9030..c4d91bc8 100644 --- a/Sources/XcodeGraph/Models/RunAction.swift +++ b/Sources/XcodeGraph/Models/RunAction.swift @@ -16,6 +16,7 @@ public struct RunAction: Equatable, Codable, Sendable { public let diagnosticsOptions: SchemeDiagnosticsOptions public let metalOptions: MetalOptions? public let expandVariableFromTarget: TargetReference? + public let askForAppToLaunch: Bool public let launchStyle: LaunchStyle public let appClipInvocationURL: URL? public var customWorkingDirectory: AbsolutePath? @@ -36,6 +37,7 @@ public struct RunAction: Equatable, Codable, Sendable { diagnosticsOptions: SchemeDiagnosticsOptions, metalOptions: MetalOptions? = nil, expandVariableFromTarget: TargetReference? = nil, + askForAppToLaunch: Bool = false, launchStyle: LaunchStyle = .automatically, appClipInvocationURL: URL? = nil, customWorkingDirectory: AbsolutePath? = nil, @@ -53,6 +55,7 @@ public struct RunAction: Equatable, Codable, Sendable { self.diagnosticsOptions = diagnosticsOptions self.metalOptions = metalOptions self.expandVariableFromTarget = expandVariableFromTarget + self.askForAppToLaunch = askForAppToLaunch self.launchStyle = launchStyle self.appClipInvocationURL = appClipInvocationURL self.customWorkingDirectory = customWorkingDirectory @@ -81,6 +84,7 @@ public struct RunAction: Equatable, Codable, Sendable { apiValidation: true ), expandVariableFromTarget: TargetReference? = nil, + askForAppToLaunch: Bool = false, launchStyle: LaunchStyle = .automatically, appClipInvocationURL: URL? = nil, customWorkingDirectory: AbsolutePath? = nil, @@ -99,6 +103,7 @@ public struct RunAction: Equatable, Codable, Sendable { diagnosticsOptions: diagnosticsOptions, metalOptions: metalOptions, expandVariableFromTarget: expandVariableFromTarget, + askForAppToLaunch: askForAppToLaunch, launchStyle: launchStyle, appClipInvocationURL: appClipInvocationURL, customWorkingDirectory: customWorkingDirectory, diff --git a/Tests/XcodeGraphTests/Models/ProfileActionTests.swift b/Tests/XcodeGraphTests/Models/ProfileActionTests.swift index 7f9ad126..c691ed2d 100644 --- a/Tests/XcodeGraphTests/Models/ProfileActionTests.swift +++ b/Tests/XcodeGraphTests/Models/ProfileActionTests.swift @@ -13,6 +13,7 @@ final class ProfileActionTests: XCTestCase { projectPath: try! AbsolutePath(validating: "/path/to/project"), name: "name" ), + askForAppToLaunch: true, arguments: .init( environmentVariables: [ "key": EnvironmentVariable(value: "value", isEnabled: true), diff --git a/Tests/XcodeGraphTests/Models/RunActionTests.swift b/Tests/XcodeGraphTests/Models/RunActionTests.swift index 0b8b3d67..7ac8714f 100644 --- a/Tests/XcodeGraphTests/Models/RunActionTests.swift +++ b/Tests/XcodeGraphTests/Models/RunActionTests.swift @@ -32,6 +32,7 @@ final class RunActionTests: XCTestCase { mainThreadCheckerEnabled: true, performanceAntipatternCheckerEnabled: true ), + askForAppToLaunch: true, appClipInvocationURL: URL(string: "https://app-clips-url.com/example") )