LaunchArgumentWithSingleValue
public protocol LaunchArgumentWithSingleValue : LaunchArgument
Protocol that should be implemented by types representing launch argument that accepts single argument value.
Example:
enum Server: String, LaunchArgumentWithSingleValue, LaunchArgumentValue {
case testing, production
var key: String {
return "Server"
}
}
Usage:
let app = XCUIApplication()
TestLauncher(options: [
Server.testing
]).configure(app).launch()
Handling:
let serverAddress = UserDefaults.standard.string(forKey: "Server")
-
value
Default implementationValue of the launch argument.
Default Implementation
Default formatted representation of the launch argument value.
Declaration
Swift
var value: LaunchArgumentValue { get }
-
launchArguments
Extension methodDefault formatted representation of the launch argument.
Declaration
Swift
public var launchArguments: [String]? { get }