# Any documentation or guides on how to add a .xcframework to an unreal project?

**URL:** <https://forums.unrealengine.com/t/any-documentation-or-guides-on-how-to-add-a-xcframework-to-an-unreal-project/1247582>\
**Category:** Mobile\
**Tags:** unreal-engine, iOS, UE5, CPP\
**Created:** [August 1, 2023, 10:34pm UTC](https://forums.unrealengine.com/t/any-documentation-or-guides-on-how-to-add-a-xcframework-to-an-unreal-project/1247582 "2023-08-01T22:34:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nonlin](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Nonlin](https://forums.unrealengine.com/u/Nonlin)\
**Post date:** [August 1, 2023, 10:34pm UTC](https://forums.unrealengine.com/t/any-documentation-or-guides-on-how-to-add-a-xcframework-to-an-unreal-project/1247582/1 "2023-08-01T22:34:51Z")

</div>

Trying to figure out how to add a .xcframework of mine to a mobile iOS app made with Unreal Engine 5.2.

---

<div class="post-metadata">

**Author:** ![fxps1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@fxps1](https://forums.unrealengine.com/u/fxps1)\
**Post date:** [February 26, 2024, 10:37am UTC](https://forums.unrealengine.com/t/any-documentation-or-guides-on-how-to-add-a-xcframework-to-an-unreal-project/1247582/2 "2024-02-26T10:37:58Z")

</div>

最近我在UE4 4.27.2 引擎版本的项目对接 .xcframework时，找到了解决方法，我该解决方法不知道是否地道，但经过测试，该解决办法确实是可行的、有效的（希望能帮助到你或有需要的小伙伴）。解决办法如下：  
1.在项目或插件的配置文件\*.Build.cs里iOS平台下添加以下格式的代码：  
if (Target.Platform == UnrealTargetPlatform.IOS)  
{  
PublicAdditionalFrameworks.Add(  
new Framework(  
“YourSDKName”,  
“…/ThirdParty/YourSDKName.xcframework/ios-arm64/YourSDKName.framework”,  
“”,  
true  
)  
);  
}

注：上面YourSDKName.xcframework后面的路径具体用啥，根据自己的实际情况填写，我这边只是做举例作用。  
2.在项目或插件的Source/ThirdParty文件夹下，放置你的SDK（YourSDKName.xcframework），然后就可以愉快的使用xcfamrework格式的SDK了。
