Documentation
¶
Overview ¶
Package projectmanager parses and edits an Xcode project.
Use cases:
- Get codesigning related information, needed to fetch or recreate certificates and provisioning profiles
- Apply codesigning settings in the projects
Index ¶
- func CanGenerateProfileWithEntitlements(entitlementsByBundleID map[string]autocodesign.Entitlements) (ok bool, badEntitlement string, badBundleID string)
- type BuildAction
- type Factory
- type InitParams
- type Project
- func (p Project) ForceCodesignAssets(distribution autocodesign.DistributionType, ...) error
- func (p Project) GetAppLayout(uiTestTargets bool) (autocodesign.AppLayout, error)
- func (p Project) IsMainTargetProductTypeAppClip() bool
- func (p Project) IsSigningManagedAutomatically() (bool, error)
- func (p Project) MainTargetBundleID() (string, error)
- func (p Project) Platform() (autocodesign.Platform, error)
- func (p Project) ReadSchemeBuildSettingString(key string) (string, error)
- type ProjectHelper
- func (p *ProjectHelper) ArchivableTargetBundleIDToEntitlements() (map[string]autocodesign.Entitlements, error)
- func (p *ProjectHelper) ArchivableTargets() []xcodeproj.Target
- func (p *ProjectHelper) IsSigningManagedAutomatically() (bool, error)
- func (p *ProjectHelper) Platform(configurationName string) (autocodesign.Platform, error)
- func (p *ProjectHelper) ProjectTeamID(config string) (string, error)
- func (p *ProjectHelper) TargetBundleID(name, conf string) (string, error)
- func (p *ProjectHelper) UITestTargetBundleIDs() ([]string, error)
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 ...
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 ¶
IsMainTargetProductTypeAppClip returns true if the main target is of App Clip product type
func (Project) IsSigningManagedAutomatically ¶
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 ¶
MainTargetBundleID returns the bundle ID of the main target
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 ...