Legacy Documentation: Version 5.4
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

Sumbission failed

For some reason your suggested change could not be submitted. Please try again 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 Functions

AddBuildPropertyAdds a value to build property in all build configurations for the specified target(s).
AddBuildPropertyForConfigAdds a value to build property for the specific build configuration.
AddFileAdds file to the project.
AddFileToBuildConfigures file for building for the given target.
AddFileToBuildWithFlagsConfigures file for building for the given target with specific compiler flags.
AddFrameworkToProjectAdds a framework dependency for the specified target.
BuildConfigByNameReturns the GUID of build configuration with the given name for the specific target. null is returned if such configuration does not exist.
ContainsFileByProjectPathChecks if the project contains a file with the given project path.
ContainsFileByRealPathChecks if the project contains a file with the given physical path.
FindFileGuidByProjectPathFinds file GUID by project path.
FindFileGuidByRealPathFinds file GUID by physical path.
GetCompileFlagsForFileReturns compile flags set for the specific file.
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.
RemoveFileRemoves the given file from project.
RemoveFileFromBuildRemoves given file from the list of files to build for the given target.
RemoveFrameworkFromProjectRemoves the given framework from the given target build.
SetBuildPropertySets the build property to the given value in all build configurations for the specified targets.
SetBuildPropertyForConfigSets the build property to the given value in the given build property.
SetCompileFlagsForFileSets the compilation flags for the given file in the given target.
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 Functions

GetPBXProjectPathReturns the path to PBX project in the given build path.
GetUnityTargetNameReturns the default app target name.
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.