Description

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.)

 

Attempted Solutions

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

Steps to Reproduce
  1. In the client project, put the code to add Framework to Build.cs
  2. Actually add the framework.zip file to that path.
  3. GenerateProjectFiles with Modernxcode and try to build it.
  4. Build failed due to framework link failure

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-210471 in the post.

0
Login to Vote

Unresolved
ComponentUE - Platform - Apple
Affects Versions5.4
Target Fix5.6
CreatedMar 25, 2024
UpdatedOct 10, 2024
View Jira Issue