# GetUnityTargetName()

> Deprecated. Returns the default main target name in Unity project.

## Definition

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

> **Warning:**
>
> **Removed.** This function is deprecated. There are two targets now, call GetUnityMainTargetGuid() - for app or GetUnityFrameworkTargetGuid() - for source/plugins to get Guid instead of calling to TargetGuidByName(GetUnityTargetName()).

```csharp
public static string GetUnityTargetName()
```

### Returns

| Type                                                           | Description                   |
| -------------------------------------------------------------- | ----------------------------- |
| [string](https://learn.microsoft.com/dotnet/api/system.string) | The default main target name. |

### Remarks

Deprecated. The returned target name can then be used to retrieve the GUID of the target via [PBXProject.TargetGuidByName](/engine/6000.6/script-reference/unityeditor/ios/xcode/pbxproject/targetguidbyname.md) function. This function can only be used in Unity-generated projects. Use [PBXProject.GetUnityMainTargetGuid](/engine/6000.6/script-reference/unityeditor/ios/xcode/pbxproject/getunitymaintargetguid.md) or [PBXProject.GetUnityFrameworkTargetGuid](/engine/6000.6/script-reference/unityeditor/ios/xcode/pbxproject/getunityframeworktargetguid.md) to get GUID.  You need not call [PBXProject.TargetGuidByName](/engine/6000.6/script-reference/unityeditor/ios/xcode/pbxproject/targetguidbyname.md) function.
