projectmanager

package
v2.0.0-alpha.74 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2025 License: MIT Imports: 17 Imported by: 6

Documentation

Overview

Package projectmanager parses and edits an Xcode project.

Use cases:

  1. Get codesigning related information, needed to fetch or recreate certificates and provisioning profiles
  2. Apply codesigning settings in the projects

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CanGenerateProfileWithEntitlements

func CanGenerateProfileWithEntitlements(entitlementsByBundleID map[string]autocodesign.Entitlements) (ok bool, badEntitlement string, badBundleID string)

CanGenerateProfileWithEntitlements checks all entitlements, whether they can be generated

Types

type BuildAction

type BuildAction string

BuildAction is the type of build action to be performed on the scheme.

const (
	// BuildActionArchive is the archive build action.
	BuildActionArchive BuildAction = "archive"
	// BuildActionBuild is the build build action.
	BuildActionBuild BuildAction = "build"
	// BuildActionTest is the test build action.
	BuildActionTest BuildAction = "test"
)

type Factory

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

Factory ...

func NewFactory

func NewFactory(logger log.Logger, envRepo env.Repository, buildAction BuildAction) Factory

NewFactory ...

func (*Factory) Create

func (f *Factory) Create(params InitParams) (Project, error)

Create ...

type InitParams

type InitParams struct {
	ProjectOrWorkspacePath                       string
	SchemeName                                   string
	ConfigurationName                            string
	AdditionalXcodebuildShowbuildsettingsOptions []string
}

InitParams ...

type Project

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

Project ...

func (Project) ForceCodesignAssets

func (p Project) ForceCodesignAssets(distribution autocodesign.DistributionType, codesignAssetsByDistributionType map[autocodesign.DistributionType]autocodesign.AppCodesignAssets) error

ForceCodesignAssets ...

func (Project) GetAppLayout

func (p Project) GetAppLayout(uiTestTargets bool) (autocodesign.AppLayout, error)

GetAppLayout ...

func (Project) IsMainTargetProductTypeAppClip

func (p Project) IsMainTargetProductTypeAppClip() bool

IsMainTargetProductTypeAppClip returns true if the main target is of App Clip product type

func (Project) IsSigningManagedAutomatically

func (p Project) IsSigningManagedAutomatically() (bool, error)

IsSigningManagedAutomatically checks the "Automatically manage signing" checkbox in Xcode Note: it only checks the main Target based on the given Scheme and Configuration

func (Project) MainTargetBundleID

func (p Project) MainTargetBundleID() (string, error)

MainTargetBundleID returns the bundle ID of the main target

func (Project) Platform

func (p Project) Platform() (autocodesign.Platform, error)

Platform get the platform (PLATFORM_DISPLAY_NAME) - iOS, tvOS, macOS

func (Project) ReadSchemeBuildSettingString

func (p Project) ReadSchemeBuildSettingString(key string) (string, error)

ReadSchemeBuildSettingString reads a build setting (for example SDKROOT) from the workspace (if available) or project.

type ProjectHelper

type ProjectHelper struct {
	MainTarget       xcodeproj.Target
	DependentTargets []xcodeproj.Target
	UITestTargets    []xcodeproj.Target
	XcWorkspace      *xcworkspace.Workspace // nil if working with standalone project
	XcProj           xcodeproj.XcodeProj
	Configuration    string
	// contains filtered or unexported fields
}

ProjectHelper ...

func NewProjectHelper

func NewProjectHelper(projOrWSPath string, logger log.Logger, schemeName string, buildAction BuildAction, configurationName string, additionalXcodebuildOptions []string, isDebug bool) (*ProjectHelper, error)

NewProjectHelper checks the provided project or workspace and generate a ProjectHelper with the provided scheme and configuration Previously in the ruby version the initialize method did the same It returns a new ProjectHelper, whose Configuration field contains is the selected configuration (even when configurationName parameter is empty)

func (*ProjectHelper) ArchivableTargetBundleIDToEntitlements

func (p *ProjectHelper) ArchivableTargetBundleIDToEntitlements() (map[string]autocodesign.Entitlements, error)

ArchivableTargetBundleIDToEntitlements ...

func (*ProjectHelper) ArchivableTargets

func (p *ProjectHelper) ArchivableTargets() []xcodeproj.Target

ArchivableTargets ...

func (*ProjectHelper) IsSigningManagedAutomatically

func (p *ProjectHelper) IsSigningManagedAutomatically() (bool, error)

IsSigningManagedAutomatically checks the "Automatically manage signing" checkbox in Xcode Note: it only checks the main Target based on the given Scheme and Configuration

func (*ProjectHelper) Platform

func (p *ProjectHelper) Platform(configurationName string) (autocodesign.Platform, error)

Platform get the platform (PLATFORM_DISPLAY_NAME) - iOS, tvOS, macOS

func (*ProjectHelper) ProjectTeamID

func (p *ProjectHelper) ProjectTeamID(config string) (string, error)

ProjectTeamID returns the development team's ID If there is multiple development team in the project (different team for targets) it will return an error It returns the development team's ID

func (*ProjectHelper) TargetBundleID

func (p *ProjectHelper) TargetBundleID(name, conf string) (string, error)

TargetBundleID returns the target bundle ID First it tries to fetch the bundle ID from the `PRODUCT_BUNDLE_IDENTIFIER` build settings If it's no available it will fetch the target's Info.plist and search for the `CFBundleIdentifier` key. The CFBundleIdentifier's value is not resolved in the Info.plist, so it will try to resolve it by the resolveBundleID() It returns the target bundle ID

func (*ProjectHelper) UITestTargetBundleIDs

func (p *ProjectHelper) UITestTargetBundleIDs() ([]string, error)

UITestTargetBundleIDs ...

Jump to

Keyboard shortcuts

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