# AddWatchExtension(PBXProject, string, string, string, string)

> Creates a watch extension.

## Definition

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

```csharp
public static string AddWatchExtension(this PBXProject proj, string mainTarget, string name, string bundleId, string infoPlistPath)
```

### Parameters

**** (\[PBXProject]\(/engine/6000.3/script-reference/unityeditor/ios/xcode/pbxproject)): The implicit `this` parameter for the extension method.**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): The GUID of the main target to link the watch extension to.**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): The name of the watch extension.**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): The bundle ID of the watch extension. This bundle ID must include the bundle ID that is later used for watch app as a prefix. That is, the structure of the ID is as follows: watchAppBundleId + ".a\_subdomain".**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): Path to the watch extension Info.plist document.

### Returns

| Type                                                           | Description                 |
| -------------------------------------------------------------- | --------------------------- |
| [string](https://learn.microsoft.com/dotnet/api/system.string) | The GUID of the new target. |
