String
extension String: LaunchEnvironmentValue
Default implementation LaunchEnvironmentValue for string. Usage example:
public struct StringLaunchEnvironment: LaunchEnvironmentProtocol {
public typealias Value = String
public let value: Value
public var launchEnvironments: [String : String]? {
return [uniqueIdentifier: value]
}
public init(value: Value) {
self.value = value
}
}
Note
internal
initializer would be generated automatically but it would not fulfill requirement of public
protocol.
-
String
which is passed with launch enviroment.Declaration
Swift
public var value: String { get }