Class PBXProjectExtensions
Namespace: UnityEditor.iOS.Xcode.Custom.Extensions
Syntax
public static class PBXProjectExtensions
Methods
AddAppExtension(PBXProject, String, String, String, String)
Creates an app extension.
Declaration
public static string AddAppExtension(this PBXProject proj, string mainTargetGuid, string name, string bundleId, string infoPlistPath)
Parameters
Type | Name | Description |
---|---|---|
PBXProject | proj | A project passed as this argument. |
String | mainTargetGuid | The GUID of the main target to link the app to. |
String | name | The name of the app extension. |
String | bundleId | The bundle ID of the app extension. The bundle ID must be prefixed with the parent app bundle ID. |
String | infoPlistPath | Path to the app extension Info.plist document. |
Returns
Type | Description |
---|---|
String | The GUID of the new target. |
AddFileToEmbedFrameworks(PBXProject, String, String)
Configures file for embed framework section for the given native target.
This function also internally calls
proj.AddFileToBuild(targetGuid, fileGuid)
to ensure that the framework is added to the list of linked frameworks.
If the target has already configured the given file as embedded framework, this function has no effect.
A projects containing multiple native targets, a single file or folder reference can be configured to be built in all, some or none of the targets. The file or folder reference is added to appropriate build section depending on the file extension.
Declaration
public static void AddFileToEmbedFrameworks(this PBXProject proj, string targetGuid, string fileGuid)
Parameters
Type | Name | Description |
---|---|---|
PBXProject | proj | A project passed as this argument. |
String | targetGuid | The GUID of the target as returned by [[TargetGuidByName()]]. |
String | fileGuid | The file GUID returned by [[AddFile]] or [[AddFolderReference]]. |
AddWatchApp(PBXProject, String, String, String, String, String)
Creates a watch application.
Declaration
public static string AddWatchApp(this PBXProject proj, string mainTargetGuid, string watchExtensionTargetGuid, string name, string bundleId, string infoPlistPath)
Parameters
Type | Name | Description |
---|---|---|
PBXProject | proj | A project passed as this argument. |
String | mainTargetGuid | The GUID of the main target to link the watch app to. |
String | watchExtensionTargetGuid | The GUID of watch extension as returned by [[AddWatchExtension()]]. |
String | name | The name of the watch app. It must the same as the name of the watch extension. |
String | bundleId | The bundle ID of the watch app. |
String | infoPlistPath | Path to the watch app Info.plist document. |
Returns
Type | Description |
---|---|
String | The GUID of the new target. |
AddWatchExtension(PBXProject, String, String, String, String)
Creates a watch extension.
Declaration
public static string AddWatchExtension(this PBXProject proj, string mainTarget, string name, string bundleId, string infoPlistPath)
Parameters
Type | Name | Description |
---|---|---|
PBXProject | proj | A project passed as this argument. |
String | mainTarget | The GUID of the main target to link the watch extension to. |
String | name | The name of the watch extension. |
String | bundleId | The bundle ID of the watch extension. The bundle ID must be prefixed with the parent watch app bundle ID. |
String | infoPlistPath | Path to the watch extension Info.plist document. |
Returns
Type | Description |
---|---|
String | The GUID of the new target. |