Legacy Documentation: Version 2018.1 (Go to current version)
LanguageEnglish
  • C#
  • JS

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

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.
AddResourcesBuildPhaseCreates a new resources build phase for given target.
AddSourcesBuildPhaseCreates a new sources build phase for given target.
AddTargetCreates a new native target.
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.
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.
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.
GetFrameworksBuildPhaseByTargetReturns the GUID of frameworks build phase for the given target.
GetResourcesBuildPhaseByTargetReturns the GUID of resources 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.
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.
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.
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.
GetUnityTargetNameReturns the default main target name in Unity project.
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.
对文档有任何疑问,请移步至开发者社区提问,我们将尽快为您解答