LaunchEnvironmentProtocol
public protocol LaunchEnvironmentProtocol : LaunchOption
Protocol defining minimal requirements of launch environment option to be handled by framework.
Example:
public struct SimpleLaunchEnvironment: LaunchEnvironmentProtocol {
public typealias Value = String
public let value: String
public var launchEnvironments: [String : String]? {
return [uniqueIdentifier: value]
}
public init(value: String) {
self.value = value
}
}
Note
internal
initializer would be generated automatically but it would not fulfill requirement of public
protocol.
-
Type of
value
that will be passed as launch environment value. It needs to conform toLaunchEnvironmentValue
protocol to provideString
value passed to application.Declaration
Swift
associatedtype Value : LaunchEnvironmentValue
-
launchArguments
Extension methodLaunch arguments provided by this
Launch environment does not have to provide launch arguments.
Declaration
Swift
var launchArguments: [String]? { get }