Version: 2023.1
LanguageEnglish
  • C#

PBXProject

class in UnityEditor.iOS.Xcode

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Description

Represents an Xcode project (pbxproj file).

Constructors

PBXProjectCreates a new instance of PBXProject class.

Public Methods

AddAssetTagForFileAdds an asset tag for the given file.
AddAssetTagToDefaultInstallAdds the asset tag to the list of tags to download during initial installation.
AddBuildConfigCreates a new set of build configurations for all targets in the project.
AddBuildPropertyAdds a value to build property list in all build configurations for the specified target(s).
AddBuildPropertyForConfigAdds a value to build property list of the given build configuration(s).
AddCapabilityAdd a target capability to the Xcode project. This enables behavior based on the capability type. Some capabilities will require additional setup within Xcode. For more control over the specific settings of capability use the ProjectCapabilityManager class.
AddCopyFilesBuildPhaseCreates a new copy files build phase for given target.
AddFileAdds a new file reference to the list of known files.
AddFileToBuildConfigures file for building for the given native target.
AddFileToBuildSectionConfigures file for building for the given native target on specific build section.
AddFileToBuildWithFlagsConfigures file for building for the given target with specific compiler flags.
AddFolderReferenceAdds a new folder reference to the list of known files.
AddFrameworksBuildPhaseCreates a new frameworks build phase for given target.
AddFrameworkToProjectAdds a system framework dependency for the specified target.
AddHeadersBuildPhaseCreates a new headers build phase (PBXHeadersBuildPhase) for given target.
AddKnownRegionAdds the provided regions to the Xcode Project.
AddLocaleVariantFileAdds Locale to Variant Group of Xcode Project for iOS platform.
AddPublicHeaderToBuildConfigures file for building for the given native target as a public header.
AddRemotePackageFrameworkToProjectAdds a remote package framework dependency for the specified target.
AddRemotePackageReferenceAtBranchAdds a reference to the remote package at the given branch.
AddRemotePackageReferenceAtRevisionAdds a reference to the remote package at the given revision.
AddRemotePackageReferenceAtVersionAdds a reference to the remote package at the given version.
AddRemotePackageReferenceAtVersionUpToNextMajorAdds a reference to the remote package at the given version and allows updates up to the next major version.
AddRemotePackageReferenceAtVersionUpToNextMinorAdds a reference to the remote package at the given version and allows updates up to the next minor version.
AddRemotePackageReferenceWithVersionRangeAdds a reference to the remote package and allows updates in the given version range.
AddResourcesBuildPhaseCreates a new resources build phase for given target.
AddShellScriptBuildPhaseCreates a new copy shell script phase for given target.
AddSourcesBuildPhaseCreates a new sources build phase for given target.
AddTargetCreates a new native target.
AddTargetDependencyCreates a dependency between this target and another target. The other target may be in a different project.
BuildConfigByNameReturns the GUID of build configuration with the given name for the specific target.
BuildConfigNamesReturns the names of the build configurations available in the project.
ClearKnownRegionsRemoves the deprecated regions that get added automatically in Xcode Project.
ContainsFileByProjectPathChecks if the project contains a file with the given project path.
ContainsFileByRealPathChecks if the project contains a file with the given physical path.
ContainsFrameworkChecks whether the given system framework is a dependency of a target.
FindFileGuidByProjectPathFinds a file with the given project path in the project, if any.
FindFileGuidByRealPathFinds a file with the given physical path in the project, if any.
GetAllBuildPhasesForTargetReturns all build phases for the specified target.
GetBaseReferenceForConfigGets the base configuration reference Guid for the specified build configuration.
GetBuildPhaseNameReturns the name of the build phase with the specified GUID.
GetBuildPhaseTypeReturns the type of the build phase with the specified GUID.
GetBuildPropertyForAnyConfigGets a build property value for the given name in all build configurations for the specified target(s). If a property has multiple values they are delimited by a space.
GetBuildPropertyForConfigGets a build property value for the given name in the specified build configuration(s). If a property has multiple values they are delimited by a space.
GetCompileFlagsForFileReturns compile flags set for the specific file on a given target.
GetCopyFilesBuildPhaseByTargetReturns the GUID of matching copy files build phase for the given target.
GetEntitlementFilePathForTargetReturns the relative path to the entitlement file for the specified build target.
GetFrameworksBuildPhaseByTargetReturns the GUID of frameworks build phase for the given target.
GetHeadersBuildPhaseByTargetReturns the GUID of headers build phase (PBXHeadersBuildPhase) for the given target.
GetRealPathsOfAllFilesGets the list of all known files.
GetResourcesBuildPhaseByTargetReturns the GUID of resources build phase for the given target.
GetShellScriptBuildPhaseForTargetReturns the GUID of matching copy shell script build phase for the given target.
GetSourcesBuildPhaseByTargetReturns the GUID of sources build phase for the given target.
GetTargetProductFileRefReturns the file reference of the artifact created by building target.
GetUnityFrameworkTargetGuidReturns GUID of the framework target in Unity project.
GetUnityMainTargetGuidReturns GUID of the main target in Unity project.
InsertCopyFilesBuildPhaseCreates a new copy files build phase for given target.
InsertShellScriptBuildPhaseCreates a new shell script build phase for given target.
ProjectGuidReturns the GUID of the project.
ReadFromFileReads the project from a file identified by the given path.
ReadFromStreamReads the project from the given text reader.
ReadFromStringReads the project from the given string.
RemoveAssetTagRemoves an asset tag.
RemoveAssetTagForFileRemoves an asset tag for the given file.
RemoveAssetTagFromDefaultInstallRemoves the asset tag from the list of tags to download during initial installation.
RemoveBuildConfigRemoves all build configurations with the given name from all targets in the project.
RemoveFileRemoves the given file from project.
RemoveFileFromBuildRemoves given file from the list of files to build for the given target.
RemoveFrameworkFromProjectRemoves a system framework dependency for the specified target.
ReplaceFileReplaces a specified file with a new file.
SetBaseReferenceForConfigSets the base configuration reference for the specified build configuration.
SetBuildPropertySets a build property to the given value in all build configurations for the specified target(s).
SetBuildPropertyForConfigSets a build property to the given value in the specified build configuration(s).
SetCompileFlagsForFileSets the compilation flags for the given file in the given target.
SetDevelopmentRegionSets the default language and region for the bundle in Xcode Project.
SetTeamIdSet the Team ID of an Xcode project.
TargetGuidByNameReturns the GUID of the native target with the given name.
UpdateBuildPropertyAdds and removes values from build property in all build configurations for the specified target(s).
UpdateBuildPropertyForConfigAdds and removes values from build property in the given build configuration.
WriteToFileWrites the project contents to the specified file.
WriteToStreamWrites the project contents to the specified text writer.
WriteToStringWrites the contents of the project to string.

Static Methods

GetPBXProjectPathReturns the path to PBX project in the given Unity build path.
GetUnityTestTargetNameReturns the default test target name.
IsBuildableChecks if a file with the given extension can be built by Xcode.
IsKnownExtensionChecks if files with the given extension are known to PBXProject.
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961