Our client is attempting to use an external framework as a third party within Unreal Engine, and they are encountering issues despite following the standard guidelines for adding the framework.
The conventional method for adding a framework involves modifying the [ModuleName].Build.cs file, where I use the PublicAdditionalFrameworks.Add() method like so:
The framework used in the example is FirebaseCore, which is included in the engine
PublicAdditionalFrameworks.Add(
new Framework(
"FirebaseCore",
"ThirdParty/FirebaseCore.framework.zip",
Framework.FrameworkMode.LinkAndCopy));
After adding the framework in this manner, I generated a Modern Xcode project using the GenerateProjectFiles command.
[Image Removed]
In fact, when I did generate project files, it was reflected in modernxcode, but when I build it, it will fail when it is linked.
(I have confirmed that the framework files are indeed unzipped into the Engine's source directory.)
1. when using Framework.FrameworkMode.Copy.
The framework was indeed included in the output app.
Therefore, I have determined that there is a problem with the linking process.
2. I checked AddFrameworkToLinkCommand function in MacToolChain.cs and it appears that RPATH is not being properly specified
if the framework's key value does not end with .framework.
PublicAdditionalFrameworks.Add(
new Framework(
"FirebaseCore.framework", // This is the key value
"ThirdParty/FirebaseCore.framework.zip",
Framework.FrameworkMode.LinkAndCopy ) );
However, the issue persists even after these attempts.
The framework is being unzipped to Engine/Intermediate/UnzippedFrameworks. Therefore, it seems that RPATH should be set to this path. However, it is not being properly specified.
As a result, it seems that customers need a clear guide to adding third-party frameworks.
Attached is a sample of the project that can be reproduced
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-210471 in the post.
0 |
Component | UE - Platform - Apple |
---|---|
Affects Versions | 5.4 |
Target Fix | 5.6 |
Created | Mar 25, 2024 |
---|---|
Updated | Oct 10, 2024 |