xcode

package
v1.260831.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 31, 2026 License: MIT Imports: 35 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BumpMajor BumpType = "major"
	BumpMinor BumpType = "minor"
	BumpPatch BumpType = "patch"
	BumpBuild BumpType = "build"

	BuildSettingsLookupAuto  BuildSettingsLookupPolicy = "auto"
	BuildSettingsLookupNever BuildSettingsLookupPolicy = "never"
)

Variables

This section is empty.

Functions

func ActiveXcodeMajorVersion added in v1.260813.0

func ActiveXcodeMajorVersion(ctx context.Context) (int, error)

ActiveXcodeMajorVersion returns the major version reported by the active xcodebuild selected through DEVELOPER_DIR or xcode-select.

func DefaultExportOptionsPathForArchive added in v1.260722.0

func DefaultExportOptionsPathForArchive(archivePath string) string

DefaultExportOptionsPathForArchive returns the archive-adjacent default path used when an explicit ExportOptions.plist was not supplied.

func GetConsistentMarketingVersion added in v1.260722.0

func GetConsistentMarketingVersion(ctx context.Context, opts GetVersionOptions) (string, error)

GetConsistentMarketingVersion resolves one marketing version across the full selected mutation scope.

func InferArchivePlatform

func InferArchivePlatform(archivePath string) (string, error)

InferArchivePlatform returns the App Store platform for the archived app by reading the embedded app Info.plist inside the .xcarchive.

func Install added in v1.260831.0

func Install(ctx context.Context, options InstallOptions) (*asc.XcodeInstallResult, error)

Install validates, materializes, installs, and verifies one IPA on one exact connected iOS device. A non-nil result is returned for every operational failure after input validation; callers can therefore report failure without exposing the device identifier or temporary paths.

func IsDirectUploadMode

func IsDirectUploadMode(exportOptionsPlistPath string) bool

IsDirectUploadMode reports whether ExportOptions.plist uploads directly to App Store Connect instead of producing a local IPA artifact.

func IsExportDestinationUsageError added in v1.260722.0

func IsExportDestinationUsageError(err error) bool

IsExportDestinationUsageError reports whether destination preflight failed because of deterministic CLI input rather than a filesystem access error.

func NormalizeExportOptionsMethod added in v1.260816.0

func NormalizeExportOptionsMethod(value string) (string, error)

NormalizeExportOptionsMethod validates the public method enum shared by export-options generation callers.

func NormalizeExportOptionsSigningStyle added in v1.260810.0

func NormalizeExportOptionsSigningStyle(value string) (string, error)

NormalizeExportOptionsSigningStyle validates the public signing-style enum shared by export-options generation callers.

func PreflightExport added in v1.260722.0

func PreflightExport(ctx context.Context) error

PreflightExport verifies that local Xcode export tooling is available before callers perform any preparatory filesystem mutation.

func PreflightExportDestination added in v1.260722.0

func PreflightExportDestination(ipaPath string, overwrite, directUpload bool) error

PreflightExportDestination validates an IPA destination and proves its parent writable with a transient probe. Export repeats the check before the final mutation.

func SupportsBuildStatusBundleID

func SupportsBuildStatusBundleID(ctx context.Context) bool

SupportsBuildStatusBundleID reports whether the current altool help output advertises a dedicated --bundle-id flag for build-status lookups.

func UniqueDiagnosticDetails

func UniqueDiagnosticDetails(values []string) []string

func UniqueExportOptionsPathForArchive added in v1.260722.0

func UniqueExportOptionsPathForArchive(archivePath string) (string, error)

UniqueExportOptionsPathForArchive returns a non-existing archive-adjacent path suitable for implicit generation. The random suffix prevents an implicit export from replacing a user-managed ExportOptions.plist.

func ValidateBuildOptions added in v1.260810.0

func ValidateBuildOptions(opts BuildOptions) error

ValidateBuildOptions checks deterministic command-shape errors without reading the filesystem or starting a subprocess.

func ValidateBumpVersion added in v1.260722.0

func ValidateBumpVersion(ctx context.Context, opts BumpVersionOptions) error

ValidateBumpVersion verifies the complete local bump, including a consistent baseline across the selected configurations, without changing any files. Callers can use it before remote work such as resolving a build number.

func ValidateExportDestination added in v1.260722.0

func ValidateExportDestination(ipaPath string, overwrite, directUpload bool) error

ValidateExportDestination checks an IPA destination without mutating the filesystem.

func ValidateExportXcodebuildArgs added in v1.260813.0

func ValidateExportXcodebuildArgs(args []string) error

ValidateExportXcodebuildArgs rejects passthrough arguments that would switch xcodebuild away from the export operation or override paths managed by asc.

func ValidateInstallOptions added in v1.260831.0

func ValidateInstallOptions(options InstallOptions) error

ValidateInstallOptions checks deterministic command inputs without opening files or invoking any local tool.

func ValidateSetVersion added in v1.260722.0

func ValidateSetVersion(opts SetVersionOptions) error

ValidateSetVersion verifies that a version mutation is locally valid and editable without changing any files. Callers can use it before remote work.

func ValidateTestOptions added in v1.260831.0

func ValidateTestOptions(opts TestOptions) error

ValidateTestOptions checks deterministic command-shape errors without reading the filesystem or starting a subprocess.

Types

type ArchiveOptions

type ArchiveOptions struct {
	WorkspacePath  string
	ProjectPath    string
	Scheme         string
	Configuration  string
	ArchivePath    string
	Clean          bool
	Overwrite      bool
	XcodebuildArgs []string
	LogWriter      io.Writer
}

type ArchiveResult

type ArchiveResult struct {
	ArchivePath   string `json:"archive_path"`
	BundleID      string `json:"bundle_id,omitempty"`
	Version       string `json:"version,omitempty"`
	BuildNumber   string `json:"build_number,omitempty"`
	Scheme        string `json:"scheme,omitempty"`
	Configuration string `json:"configuration,omitempty"`
}

func Archive

func Archive(ctx context.Context, opts ArchiveOptions) (*ArchiveResult, error)

type BuildOptions added in v1.260810.0

type BuildOptions struct {
	WorkspacePath    string
	ProjectPath      string
	Scheme           string
	Configuration    string
	Destination      string
	DerivedDataPath  string
	ResultBundlePath string
	Clean            bool
	NoCodeSigning    bool
	XcodebuildArgs   []string
	LogWriter        io.Writer
}

BuildOptions describes an ordinary local xcodebuild compile.

type BuildResult added in v1.260810.0

type BuildResult struct {
	WorkspacePath     string `json:"workspace,omitempty"`
	ProjectPath       string `json:"project,omitempty"`
	Scheme            string `json:"scheme"`
	Configuration     string `json:"configuration,omitempty"`
	Destination       string `json:"destination,omitempty"`
	DerivedDataPath   string `json:"derived_data_path"`
	ResultBundlePath  string `json:"result_bundle_path,omitempty"`
	BuildProductsPath string `json:"build_products_path,omitempty"`
	Clean             bool   `json:"clean"`
	NoCodeSigning     bool   `json:"no_code_signing"`
	Success           bool   `json:"success"`
	DurationMS        int64  `json:"duration_ms"`
	ExitStatus        *int   `json:"exit_status,omitempty"`
}

BuildResult is the stable structured result for an ordinary Xcode build.

func Build added in v1.260810.0

func Build(ctx context.Context, opts BuildOptions) (*BuildResult, error)

Build runs an ordinary local xcodebuild compile. If xcodebuild starts and fails, the returned result records failure details while the error preserves the subprocess or context error chain.

type BuildSettingsLookupPolicy added in v1.260804.0

type BuildSettingsLookupPolicy string

BuildSettingsLookupPolicy controls whether version commands may fall back to xcodebuild when structured project parsing cannot resolve version settings.

func ParseBuildSettingsLookupPolicy added in v1.260804.0

func ParseBuildSettingsLookupPolicy(value string) (BuildSettingsLookupPolicy, error)

ParseBuildSettingsLookupPolicy validates and normalizes the xcodebuild build-settings fallback policy. An empty value preserves the default auto behavior for programmatic callers.

type BuildSettingsLookupSession added in v1.260804.0

type BuildSettingsLookupSession struct {
	// contains filtered or unexported fields
}

BuildSettingsLookupSession shares successful fallback reads and diagnostic state across the phases of one version command.

func NewBuildSettingsLookupSession added in v1.260804.0

func NewBuildSettingsLookupSession(policy BuildSettingsLookupPolicy, diagnostic io.Writer) *BuildSettingsLookupSession

NewBuildSettingsLookupSession creates command-scoped state for xcodebuild build-settings fallback reads.

type BuildStatusOptions

type BuildStatusOptions struct {
	AppleID            string
	BundleID           string
	BundleVersion      string
	BundleShortVersion string
	Platform           string
	APIKey             string
	APIIssuer          string
	P8FilePath         string
	LogWriter          io.Writer
}

type BuildStatusResult

type BuildStatusResult struct {
	BuildStatus      string   `json:"build_status,omitempty"`
	DeliveryUUID     string   `json:"delivery_uuid,omitempty"`
	ImportStatus     string   `json:"import_status,omitempty"`
	ProcessingErrors []string `json:"processing_errors,omitempty"`
}

func BuildStatus

func BuildStatus(ctx context.Context, opts BuildStatusOptions) (*BuildStatusResult, error)

type BumpType

type BumpType string

BumpType represents the version component to increment.

func ParseBumpType

func ParseBumpType(s string) (BumpType, error)

ParseBumpType validates and normalizes a bump type string.

type BumpVersionOptions

type BumpVersionOptions struct {
	ProjectDir              string
	Target                  string
	Configuration           string
	BumpType                BumpType
	BuildNumber             string
	BuildSettingsLookup     BuildSettingsLookupPolicy
	BuildSettingsDiagnostic io.Writer
	BuildSettingsSession    *BuildSettingsLookupSession
	// AllowExternalXCConfig authorizes rewriting xcconfig files that the project
	// references outside its own directory. Without it, such a mutation fails.
	AllowExternalXCConfig bool
}

BumpVersionOptions configures the bump operation.

type BumpVersionResult

type BumpVersionResult struct {
	BumpType      string          `json:"bumpType"`
	OldVersion    string          `json:"oldVersion,omitempty"`
	NewVersion    string          `json:"newVersion,omitempty"`
	OldBuild      string          `json:"oldBuild,omitempty"`
	NewBuild      string          `json:"newBuild,omitempty"`
	ProjectDir    string          `json:"projectDir"`
	Target        string          `json:"target,omitempty"`
	Configuration string          `json:"configuration,omitempty"`
	ChangedFiles  []string        `json:"changedFiles"`
	Changes       []VersionChange `json:"changes"`
}

BumpVersionResult holds the result of a bump operation.

func BumpVersion

func BumpVersion(ctx context.Context, opts BumpVersionOptions) (*BumpVersionResult, error)

BumpVersion increments the version or build number.

type ExportOptions

type ExportOptions struct {
	ArchivePath    string
	ExportOptions  string
	IPAPath        string
	Overwrite      bool
	XcodebuildArgs []string
	Environment    []string
	LogWriter      io.Writer
	// contains filtered or unexported fields
}

type ExportOptionsGenerateOptions added in v1.260722.0

type ExportOptionsGenerateOptions struct {
	ArchivePath  string
	OutputPath   string
	Method       string
	Destination  string
	SigningStyle string
	TeamID       string
	Overwrite    bool
}

ExportOptionsGenerateOptions describes an ExportOptions.plist generated from an existing Xcode archive.

type ExportOptionsGenerateResult added in v1.260722.0

type ExportOptionsGenerateResult struct {
	Path                 string            `json:"path"`
	ArchivePath          string            `json:"archive_path"`
	Method               string            `json:"method"`
	Destination          string            `json:"destination"`
	SigningStyle         string            `json:"signing_style"`
	TeamID               string            `json:"team_id,omitempty"`
	SigningCertificate   string            `json:"signing_certificate,omitempty"`
	ProvisioningProfiles map[string]string `json:"provisioning_profiles,omitempty"`
	Overwritten          bool              `json:"overwritten"`
}

ExportOptionsGenerateResult describes the generated ExportOptions.plist.

func GenerateExportOptions added in v1.260722.0

GenerateExportOptions creates a validated ExportOptions.plist without changing signing assets. Automatic signing only reads archive metadata; manual signing may inspect locally installed profiles and identities.

type ExportResult

type ExportResult struct {
	ArchivePath string `json:"archive_path"`
	IPAPath     string `json:"ipa_path"`
	BundleID    string `json:"bundle_id,omitempty"`
	Version     string `json:"version,omitempty"`
	BuildNumber string `json:"build_number,omitempty"`
}

func Export

func Export(ctx context.Context, opts ExportOptions) (*ExportResult, error)

func ExportReleaseTesting added in v1.260816.0

func ExportReleaseTesting(ctx context.Context, opts ReleaseTestingExportOptions) (*ExportResult, error)

ExportReleaseTesting verifies the immutable options artifact and exports to a new IPA path. It does not expose overwrite or xcodebuild passthrough flags, keeping retries safe to resume from an already-published stage artifact.

type GetVersionOptions added in v1.260722.0

type GetVersionOptions struct {
	ProjectDir              string
	Target                  string
	Configuration           string
	BuildSettingsLookup     BuildSettingsLookupPolicy
	BuildSettingsDiagnostic io.Writer
	BuildSettingsSession    *BuildSettingsLookupSession
}

GetVersionOptions configures a structured version read.

type InstallInputError added in v1.260831.0

type InstallInputError struct {
	// contains filtered or unexported fields
}

InstallInputError identifies a malformed or inaccessible command input. The CLI maps this error to its usage exit code without emitting an operational result, preserving the stdout-empty usage contract.

func (*InstallInputError) Error added in v1.260831.0

func (e *InstallInputError) Error() string

type InstallOptions added in v1.260831.0

type InstallOptions struct {
	IPAPath     string
	DeviceID    string
	Timeout     time.Duration
	Environment []string
}

InstallOptions describes a local IPA installation on one exact connected CoreDevice. Environment is optional; nil means use the current process environment after the strict Xcode-child allowlist is applied.

type InstallUnsupportedError added in v1.260831.0

type InstallUnsupportedError struct {
	Platform string
}

InstallUnsupportedError reports that connected-device installation is not available on the current platform.

func (*InstallUnsupportedError) Error added in v1.260831.0

func (e *InstallUnsupportedError) Error() string

type ManualReleaseTestingExportOptions added in v1.260816.0

type ManualReleaseTestingExportOptions struct {
	OutputPath           string
	TeamID               string
	SigningCertificate   string
	ProvisioningProfiles map[string]string
}

ManualReleaseTestingExportOptions is the exact signing selection for an agent-owned release-testing export. Unlike GenerateExportOptions in manual mode, this service never discovers or heuristically selects installed signing assets.

type ManualReleaseTestingExportOptionsResult added in v1.260816.0

type ManualReleaseTestingExportOptionsResult struct {
	Path   string `json:"path"`
	SHA256 string `json:"sha256"`
}

ManualReleaseTestingExportOptionsResult identifies the immutable plist artifact written for a release-testing export.

func ValidateManualReleaseTestingExportOptions added in v1.260816.0

func ValidateManualReleaseTestingExportOptions(ctx context.Context, opts ManualReleaseTestingExportOptions) (*ManualReleaseTestingExportOptionsResult, error)

ValidateManualReleaseTestingExportOptions reopens an existing create-only artifact and proves its bytes equal the exact plist this request would write.

func WriteManualReleaseTestingExportOptions added in v1.260816.0

func WriteManualReleaseTestingExportOptions(ctx context.Context, opts ManualReleaseTestingExportOptions) (*ManualReleaseTestingExportOptionsResult, error)

WriteManualReleaseTestingExportOptions writes a create-only, private ExportOptions.plist with fixed release-testing semantics. The caller must provide the exact certificate selector and every bundle-to-profile mapping.

type ReleaseTestingExportOptions added in v1.260816.0

type ReleaseTestingExportOptions struct {
	ArchivePath         string
	ExportOptionsPath   string
	ExportOptionsSHA256 string
	IPAPath             string
	Environment         []string
	LogWriter           io.Writer
}

ReleaseTestingExportOptions describes a fixed release-testing export run. Environment is required and becomes the exact environment of every xcodebuild subprocess, including the Xcode version preflight.

type ReportedTestFailuresError added in v1.260831.0

type ReportedTestFailuresError struct {
	Failed int
}

ReportedTestFailuresError reports that the test action completed and its result bundle was parsed successfully, but the parsed summary contained failing test cases. The failures are already represented in the returned TestResult, so callers that build their own failure rows can recognize this cause and avoid counting the same outcome twice. Genuine post-processing and infrastructure errors keep their own types.

func (*ReportedTestFailuresError) Error added in v1.260831.0

func (e *ReportedTestFailuresError) Error() string

type SetVersionOptions

type SetVersionOptions struct {
	ProjectDir    string
	Target        string
	Configuration string
	Version       string
	BuildNumber   string
	// AllowExternalXCConfig authorizes rewriting xcconfig files that the project
	// references outside its own directory. Without it, such a mutation fails.
	AllowExternalXCConfig bool
}

SetVersionOptions configures what to set.

type SetVersionResult

type SetVersionResult struct {
	Version       string          `json:"version,omitempty"`
	BuildNumber   string          `json:"buildNumber,omitempty"`
	ProjectDir    string          `json:"projectDir"`
	Target        string          `json:"target,omitempty"`
	Configuration string          `json:"configuration,omitempty"`
	ChangedFiles  []string        `json:"changedFiles"`
	Changes       []VersionChange `json:"changes"`
}

SetVersionResult holds the result of a set operation.

func SetVersion

func SetVersion(ctx context.Context, opts SetVersionOptions) (*SetVersionResult, error)

SetVersion sets the marketing version and/or build number.

type TestAction added in v1.260831.0

type TestAction string

TestAction identifies the xcodebuild operation selected by TestOptions.

const (
	TestActionTest                TestAction = "test"
	TestActionBuildForTesting     TestAction = "build-for-testing"
	TestActionTestWithoutBuilding TestAction = "test-without-building"
)

type TestCase added in v1.260831.0

type TestCase struct {
	Identifier string `json:"identifier"`
	Name       string `json:"name,omitempty"`
	Classname  string `json:"classname,omitempty"`
	Status     string `json:"status"`
	DurationMS int64  `json:"duration_ms,omitempty"`
	Message    string `json:"message,omitempty"`
}

TestCase is a bounded structured representation of one test case.

func ParseTestResultCases added in v1.260831.0

func ParseTestResultCases(data []byte) ([]TestCase, error)

ParseTestResultCases parses the recursive test tree returned by `xcresulttool get test-results tests`. Only Test Case nodes are exposed; suites, plans, devices, and failure-message children are structural.

type TestFailure added in v1.260831.0

type TestFailure struct {
	Identifier string `json:"identifier"`
	Message    string `json:"message,omitempty"`
}

TestFailure describes a failed test without including its complete log.

type TestOptions added in v1.260831.0

type TestOptions struct {
	WorkspacePath    string
	ProjectPath      string
	Scheme           string
	Action           string
	Configuration    string
	Destinations     []string
	TestPlan         string
	XctestrunPath    string
	OnlyTesting      []string
	SkipTesting      []string
	DerivedDataPath  string
	ResultBundlePath string
	Clean            bool
	NoCodeSigning    bool
	XcodebuildArgs   []string
	LogWriter        io.Writer
}

TestOptions describes a local xcodebuild test operation.

type TestResult added in v1.260831.0

type TestResult struct {
	WorkspacePath    string       `json:"workspace,omitempty"`
	ProjectPath      string       `json:"project,omitempty"`
	Scheme           string       `json:"scheme,omitempty"`
	Action           string       `json:"action"`
	Configuration    string       `json:"configuration,omitempty"`
	Destinations     []string     `json:"destinations,omitempty"`
	TestPlan         string       `json:"test_plan,omitempty"`
	XctestrunPath    string       `json:"xctestrun_path,omitempty"`
	DerivedDataPath  string       `json:"derived_data_path,omitempty"`
	ResultBundlePath string       `json:"result_bundle_path,omitempty"`
	Tests            *TestSummary `json:"tests,omitempty"`
	Clean            bool         `json:"clean"`
	NoCodeSigning    bool         `json:"no_code_signing"`
	Success          bool         `json:"success"`
	DurationMS       int64        `json:"duration_ms"`
	ExitStatus       *int         `json:"exit_status,omitempty"`
}

TestResult is the stable structured result for a local Xcode test operation.

func Test added in v1.260831.0

func Test(ctx context.Context, opts TestOptions) (*TestResult, error)

Test runs a local xcodebuild test operation. For test-executing actions it reads the structured result bundle after xcodebuild exits. A subprocess failure is preserved even when its partial result bundle can be summarized.

type TestSummary added in v1.260831.0

type TestSummary struct {
	Total            int           `json:"total"`
	Passed           int           `json:"passed"`
	Failed           int           `json:"failed"`
	Skipped          int           `json:"skipped"`
	ExpectedFailures int           `json:"expected_failures,omitempty"`
	DurationMS       int64         `json:"duration_ms"`
	Cases            []TestCase    `json:"cases,omitempty"`
	Failures         []TestFailure `json:"failures,omitempty"`
	// contains filtered or unexported fields
}

TestSummary contains the structured counts extracted from an xcresult.

func ParseTestResultSummary added in v1.260831.0

func ParseTestResultSummary(data []byte) (*TestSummary, error)

ParseTestResultSummary parses the stable subset emitted by xcresulttool. It accepts both count-oriented summaries and summaries that include cases, because Xcode versions differ in how much detail they expose at this level.

type ToolchainCheck added in v1.260831.0

type ToolchainCheck struct {
	Name    string
	Status  ToolchainCheckStatus
	Path    string
	Message string
}

ToolchainCheck is one check in a local Xcode toolchain report. It is a probe-layer type, not a serialization contract; command output flows through internal/asc's XcodeToolchainDoctorCheck.

type ToolchainCheckStatus added in v1.260831.0

type ToolchainCheckStatus string

ToolchainCheckStatus is the status of one local Xcode toolchain check.

const (
	ToolchainCheckStatusOK   ToolchainCheckStatus = "ok"
	ToolchainCheckStatusWarn ToolchainCheckStatus = "warn"
	ToolchainCheckStatusFail ToolchainCheckStatus = "fail"
)

type ToolchainOptions added in v1.260831.0

type ToolchainOptions struct {
	DeveloperDir string
	SDK          string
	LogWriter    io.Writer
}

ToolchainOptions controls local Xcode toolchain inspection.

type ToolchainReport added in v1.260831.0

type ToolchainReport struct {
	Status       ToolchainStatus
	Source       ToolchainSource
	DeveloperDir string
	XcodePath    string
	XcodeVersion string
	XcodeBuild   string
	// Beta is nil until developer-directory selection and normalization have
	// completed, so a failed selection cannot be reported as stable Xcode.
	Beta   *bool
	Checks []ToolchainCheck
}

ToolchainReport is the structured result for local toolchain checks. It is a probe-layer type, not a serialization contract; command output flows through internal/asc's registered camelCase XcodeToolchainDoctorResult.

func InspectToolchain added in v1.260831.0

func InspectToolchain(ctx context.Context, opts ToolchainOptions) (*ToolchainReport, error)

InspectToolchain resolves and verifies a local Xcode developer directory. It returns a report alongside probe failures whenever enough information is available to produce one.

type ToolchainSource added in v1.260831.0

type ToolchainSource string

ToolchainSource describes how the developer directory was selected.

const (
	ToolchainSourceFlag        ToolchainSource = "flag"
	ToolchainSourceEnvironment ToolchainSource = "environment"
	ToolchainSourceXcodeSelect ToolchainSource = "xcode-select"
)

type ToolchainStatus added in v1.260831.0

type ToolchainStatus string

ToolchainStatus is the overall status of a local Xcode toolchain report.

const (
	ToolchainStatusOK   ToolchainStatus = "ok"
	ToolchainStatusWarn ToolchainStatus = "warn"
	ToolchainStatusFail ToolchainStatus = "fail"
)

type ValidateOptions

type ValidateOptions struct {
	IPAPath   string
	APIKey    string
	APIIssuer string
	LogWriter io.Writer
}

type ValidateResult

type ValidateResult struct {
	IPAPath   string `json:"ipa_path"`
	Validated bool   `json:"validated"`
}

func Validate

func Validate(ctx context.Context, opts ValidateOptions) (*ValidateResult, error)

type VersionChange added in v1.260722.0

type VersionChange struct {
	Setting       string `json:"setting"`
	OldValue      string `json:"oldValue,omitempty"`
	NewValue      string `json:"newValue"`
	Target        string `json:"target,omitempty"`
	Configuration string `json:"configuration,omitempty"`
	Path          string `json:"path"`
	Source        string `json:"source"`
}

VersionChange describes one concrete build-setting mutation.

type VersionInfo

type VersionInfo struct {
	Version           string `json:"version"`
	BuildNumber       string `json:"buildNumber"`
	ProjectDir        string `json:"projectDir"`
	Target            string `json:"target,omitempty"`
	Configuration     string `json:"configuration,omitempty"`
	VersionSource     string `json:"versionSource,omitempty"`
	BuildNumberSource string `json:"buildNumberSource,omitempty"`
	Modern            bool   `json:"modern"` // true if project uses MARKETING_VERSION build setting
}

VersionInfo holds the current version and build number from an Xcode project.

func GetVersion

func GetVersion(ctx context.Context, projectDir, target string) (*VersionInfo, error)

GetVersion reads the current marketing version and build number.

func GetVersionScoped added in v1.260722.0

func GetVersionScoped(ctx context.Context, opts GetVersionOptions) (*VersionInfo, error)

GetVersionScoped reads version values from a selected Xcode target and configuration.

type XcodeVersion added in v1.260831.0

type XcodeVersion struct {
	Version string
	Build   string
}

XcodeVersion contains the version and build values reported by xcodebuild.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL