Documentation
¶
Overview ¶
Package iosbuild provides local xtool compilation and bounded iOS bundle staging.
Index ¶
- func Build(ctx context.Context, opts BuildOptions) (result *asc.IOSArtifactResult, resultErr error)
- func ChildEnvironment() []string
- func ContextWithSignals(ctx context.Context) (context.Context, context.CancelFunc)
- func CopyBundle(ctx context.Context, source, destination string) error
- func ReadAppInfo(app string) (map[string]any, error)
- func RunSigner(ctx context.Context, directory string, logs io.Writer, inputs [][]byte, ...) error
- func RunTool(ctx context.Context, directory string, logs io.Writer, executable string, ...) error
- func ValidateAppCode(app string, info map[string]any, platform uint32) error
- func ValidateDeviceApp(app string, info map[string]any) error
- func WriteIPA(ctx context.Context, app, output string) error
- type BuildOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Build ¶
func Build(ctx context.Context, opts BuildOptions) (result *asc.IOSArtifactResult, resultErr error)
Build compiles using xtool, fixes simulator metadata and signs simulator output ad hoc.
func ChildEnvironment ¶
func ChildEnvironment() []string
ChildEnvironment passes compiler children only process, locale, proxy and toolchain settings, so credentials in the caller's environment never reach them.
func ContextWithSignals ¶
ContextWithSignals lets build and signing operations clean up after termination.
func CopyBundle ¶
CopyBundle copies regular files and directories without following bundle symlinks.
func ReadAppInfo ¶
ReadAppInfo validates bounded plist input before interpreting application metadata.
func RunSigner ¶
func RunSigner(ctx context.Context, directory string, logs io.Writer, inputs [][]byte, executable string, args ...string) error
RunSigner restricts signer children to basic process and locale settings. Each input is readable by the child at /dev/fd/3, /dev/fd/4, and so on, so secrets reach it through pipes instead of files.
func RunTool ¶
func RunTool(ctx context.Context, directory string, logs io.Writer, executable string, args ...string) error
RunTool sends both compiler output streams to diagnostics, never receipt stdout.
func ValidateAppCode ¶
ValidateAppCode checks the actual binary platform before metadata or signing changes.
func ValidateDeviceApp ¶
ValidateDeviceApp accepts one thin arm64 iOS executable and resource bundles. Nested signing targets require their own profiles and are intentionally unsupported.
Types ¶
type BuildOptions ¶
type BuildOptions struct {
PackagePath, Product, AppPath, Platform, Configuration string
LogWriter io.Writer
}
BuildOptions selects an installed xtool package and a create-only artifact destination.