# XcScheme

> Represents an Xcode scheme (xcscheme file).

## Definition

* **Type:** Class
* **Namespace:** [UnityEditor.iOS.Xcode](/engine/6000.5/script-reference/unityeditor/ios/xcode.md)
* **Assembly:** UnityEditor.iOS.Extensions.Xcode

```csharp
public class XcScheme
```

## Examples

```csharp
#if UNITY_IOS
string schemePath = pathToBuiltProject + "/Unity-iPhone.xcodeproj/xcshareddata/xcschemes/Unity-iPhone.xcscheme";

var xcscheme = new XcScheme();
xcscheme.ReadFromFile(schemePath);

xcscheme.SetMetalValidationOnRun(XcScheme.MetalValidation.Extended);
xcscheme.SetFrameCaptureModeOnRun(XcScheme.FrameCaptureMode.Metal);
xcscheme.AddArgumentPassedOnLaunch("--myarg = 1");

xcscheme.WriteToFile(schemePath);
#endif
```

## Constructors

| Constructor                                                                          | Description                                   |
| ------------------------------------------------------------------------------------ | --------------------------------------------- |
| [XcScheme()](/engine/6000.5/script-reference/unityeditor/ios/xcode/xcscheme/ctor.md) | Creates a new instance of the XcScheme class. |

## Methods

| Method                                                                                                                   | Description                                                |
| ------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------- |
| [AddArgumentPassedOnLaunch](/engine/6000.5/script-reference/unityeditor/ios/xcode/xcscheme/addargumentpassedonlaunch.md) | Adds command line arguments to be passed on launch.        |
| [GetBuildConfiguration](/engine/6000.5/script-reference/unityeditor/ios/xcode/xcscheme/getbuildconfiguration.md)         | Returns the build configuration used for running.          |
| [ReadFromFile](/engine/6000.5/script-reference/unityeditor/ios/xcode/xcscheme/readfromfile.md)                           | Reads the scheme from a file identified by the given path. |
| [ReadFromStream](/engine/6000.5/script-reference/unityeditor/ios/xcode/xcscheme/readfromstream.md)                       | Reads the scheme from the given text reader.               |
| [ReadFromString](/engine/6000.5/script-reference/unityeditor/ios/xcode/xcscheme/readfromstring.md)                       | Reads the scheme from the given string.                    |
| [SetBuildConfiguration](/engine/6000.5/script-reference/unityeditor/ios/xcode/xcscheme/setbuildconfiguration.md)         | Sets the build configuration to be used for running.       |
| [SetDebugExecutable](/engine/6000.5/script-reference/unityeditor/ios/xcode/xcscheme/setdebugexecutable.md)               | Sets the **Debug executable** toggle in the scheme.        |
| [SetFrameCaptureModeOnRun](/engine/6000.5/script-reference/unityeditor/ios/xcode/xcscheme/setframecapturemodeonrun.md)   | Sets whether frame capture should be enabled.              |
| [SetMetalValidationOnRun](/engine/6000.5/script-reference/unityeditor/ios/xcode/xcscheme/setmetalvalidationonrun.md)     | Sets the **Metal API Validation** option in the scheme.    |
| [WriteToFile](/engine/6000.5/script-reference/unityeditor/ios/xcode/xcscheme/writetofile.md)                             | Writes the scheme contents to the specified file.          |
| [WriteToStream](/engine/6000.5/script-reference/unityeditor/ios/xcode/xcscheme/writetostream.md)                         | Writes the scheme contents to the specified text writer.   |
| [WriteToString](/engine/6000.5/script-reference/unityeditor/ios/xcode/xcscheme/writetostring.md)                         | Writes the contents of the scheme to a string.             |

## Enums

| Enum                                                                                                            | Description           |
| --------------------------------------------------------------------------------------------------------------- | --------------------- |
| [XcScheme.FrameCaptureMode](/engine/6000.5/script-reference/unityeditor/ios/xcode/xcscheme/framecapturemode.md) | Frame Capture mode.   |
| [XcScheme.MetalValidation](/engine/6000.5/script-reference/unityeditor/ios/xcode/xcscheme/metalvalidation.md)   | Metal API Validation. |
