Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


AddFileToEmbedFrameworks(PBXProject, string, string, string)

Adds a framework to a target's Embed Frameworks build phase.
Read time 1 minuteLast updated 12 days ago

Definition

public static void AddFileToEmbedFrameworks(this PBXProject proj, string targetGuid, string fileGuid, string linkToTargetGuid = null)

Parameters

The projects extension method receiver.

targetGuid

The GUID of the destination target, as returned by PBXProject.TargetGuidByName(string)).


linkToTargetGuid

Optional. The GUID of the target that links against this framework. Defaults to
targetGuid
.

Remarks

Adds the file to an Embed Frameworks copy phase on the
targetGuid
. The embed phase copies the framework into the app bundle. Associates the build file with
linkToTargetGuid
so that the target links the framework. Sets
LD_RUNPATH_SEARCH_PATHS
to
executable_path/Frameworks
on the link target. Enables code signing and header removal on copy. If the file is already in the phase, this method does nothing. Note: On iOS, use a different
linkToTargetGuid
when you embed the framework in the app but link it from an extension. iOS doesn't allow you to embed a framework inside another framework. On macOS, omit
linkToTargetGuid
so the same target embeds and links.