CleanableLaunchEnvironment

public protocol CleanableLaunchEnvironment : LaunchEnvironmentProtocol

Protocol to be adapted by all LaunchEnvironment options that give ability to clean present data before saving new. To work as expected it requires handing special flag appended at the beginning of launchEnvironment value. It is implemented by predefined in AutoMate options and assures that default handling is provided by AutoMate - AppBuddy

Example:

public struct CleanableSimpleLaunchEnvironment: CleanableLaunchEnvironment, LaunchEnvironmentWithSingleValue {

    public typealias Value = String
    public let key = "LAUNCH_KEY"
    public var value: String
    var shouldCleanBefore: Bool
}
  • Flag indicating if existing values should be cleaned before saving new.

    Declaration

    Swift

    var shouldCleanBefore: Bool { get }
  • CleanFlag Extension method

    Flag which is inserted at the beginning of launch enviroment value if shouldCleanBefore is set to true.

    Declaration

    Swift

    static var CleanFlag: String { get }