Skip to content

STRUCT

Settings

Contents

  • Properties
    • default
    • base
    • baseDebug
    • configurations
    • defaultSettings
  • Methods
    • init(base:baseDebug:configurations:defaultSettings:)
    • settings(base:debug:release:defaultSettings:)
    • settings(base:baseDebug:configurations:defaultSettings:)
    • settings(base:baseDebug:configurations:defaultSettings:)
swift
public struct Settings: Equatable, Codable

A group of settings configuration.

Properties

default

swift
public static let `default` = Settings(
    configurations: [.release: nil, .debug: nil],
    defaultSettings: .recommended
)

base

swift
public var base: SettingsDictionary

A dictionary with build settings that are inherited from all the configurations.

baseDebug

swift
public var baseDebug: SettingsDictionary

Base settings applied only for configurations of variant == .debug

configurations

swift
public var configurations: [BuildConfiguration: ConfigurationSettings?]

defaultSettings

swift
public var defaultSettings: DefaultSettings

Methods

init(base:baseDebug:configurations:defaultSettings:)

swift
public init(
    base: SettingsDictionary = [:],
    baseDebug: SettingsDictionary = [:],
    configurations: [BuildConfiguration: ConfigurationSettings?],
    defaultSettings: DefaultSettings = .recommended
)

settings(base:debug:release:defaultSettings:)

swift
public static func settings(
    base: SettingsDictionary = [:],
    debug: SettingsDictionary = [:],
    release: SettingsDictionary = [:],
    defaultSettings: DefaultSettings = .recommended
) -> Settings

Creates settings with default.configurations Debug and Release

  • Parameters:

    • base: A dictionary with build settings that are inherited from all the configurations.
    • debug: The debug configuration settings.
    • release: The release configuration settings.
    • defaultSettings: An enum specifying the set of default settings.
  • Note: To specify custom configurations (e.g. Debug, Beta & Release) or to specify xcconfigs, you can use the alternate static method .settings(base:configurations:defaultSettings:)

  • seealso: Configuration

  • seealso: DefaultSettings

Parameters

NameDescription
baseA dictionary with build settings that are inherited from all the configurations.
debugThe debug configuration settings.
releaseThe release configuration settings.
defaultSettingsAn enum specifying the set of default settings.

settings(base:baseDebug:configurations:defaultSettings:)

swift
public static func settings(
    base: SettingsDictionary = [:],
    baseDebug: SettingsDictionary = [:],
    configurations: [Configuration],
    defaultSettings: DefaultSettings = .recommended
) -> Settings

Creates settings with any number of configurations.

  • Parameters:

    • base: A dictionary with build settings that are inherited from all the configurations.
    • baseDebug: A dictionary with build settings that are inherited from all debug configurations.
    • configurations: A list of configurations.
    • defaultSettings: An enum specifying the set of default settings.
  • Note: Configurations shouldn't be empty, please use the alternate static method .settings(base:debug:release:defaultSettings:) to leverage the default configurations if you don't have any custom configurations.

  • seealso: Configuration

  • seealso: DefaultSettings

Parameters

NameDescription
baseA dictionary with build settings that are inherited from all the configurations.
baseDebugA dictionary with build settings that are inherited from all debug configurations.
configurationsA list of configurations.
defaultSettingsAn enum specifying the set of default settings.

settings(base:baseDebug:configurations:defaultSettings:)

swift
public static func settings(
    base: SettingsDictionary = [:],
    baseDebug: SettingsDictionary = [:],
    configurations: [BuildConfiguration: ConfigurationSettings?],
    defaultSettings: DefaultSettings = .recommended
) -> Settings

Creates settings with any number of configurations.

  • Parameters:

    • base: A dictionary with build settings that are inherited from all the configurations.
    • baseDebug: A dictionary with build settings that are inherited from all debug configurations.
    • configurations: A dictionary of configurations.
    • defaultSettings: An enum specifying the set of default settings.
  • Note: Configurations shouldn't be empty, please use the alternate static method .settings(base:debug:release:defaultSettings:) to leverage the default configurations if you don't have any custom configurations.

  • seealso: Configuration

  • seealso: DefaultSettings

Parameters

NameDescription
baseA dictionary with build settings that are inherited from all the configurations.
baseDebugA dictionary with build settings that are inherited from all debug configurations.
configurationsA dictionary of configurations.
defaultSettingsAn enum specifying the set of default settings.