Structure
ConfigResolver
Merges configuration from CLI flags, Shipfile.yml, environment variables, and built-in defaults.
struct ConfigResolverOverview
Resolution order (highest priority first):
CLI flags
Shipfile.yml values
Environment variables (
SHIPIT_*prefix)Built-in defaults
Inline secrets are the one intentional exception to this order. The raw ASC private key prefers the environment (ASC_PRIVATE_KEY) over the Shipfile (app_store_connect.private_key) so CI secrets win without having to strip the value from a committed Shipfile. See resolvePrivateKeyData(shipfile:).
Usage
let resolver = ConfigResolver()
let config = try await resolver.resolve(
cliOptions: CLIOptions(scheme: "MyApp"),
shipfilePath: "./Shipfile.yml"
)Topics
Initializers
init()Creates a
ConfigResolverreading from the current process environment.init(environment: Environment)Creates a
ConfigResolverwith a custom environment (for testing).init(environment: Environment, shell: ShellContext)Creates a
ConfigResolverwith a custom environment and shell context.
Instance Methods
func resolve(cliOptions: CLIOptions, shipfilePath: String?) async throws -> ResolvedConfigResolve and merge all configuration sources into a
ResolvedConfig.
Relationships
Conforms To
Swift.SendableSwift.SendableMetatype