When packaging 3rd-party xcframeworks as separate React Native Library, Embedded Framework is not being included

105 Views Asked by At

Apologies for long text. I need help so I am posting this and maybe someone better at me on iOS can help me.

Context: We have 3rd party libraries(2 xcframeworks) in our app. They are proprietary framework that we cannot modify in anyway. This works currently.

I am tasked to pluck those frameworks out and package them as a react native library. I generated the library project using npx create-react-native-library@latest which is what is describe in the official react native documentation

I have already included and linked them in the generated project

Added them as frameworks

Ensured that they are Linked when building

I make sure to turn Build Libraries for Distribution to true

Now I added the project as a dependency in the project and removed all the previously embedded xcframeworks (these two) since they should be coming from my new library that packages them. Note that we don't have CI/CD for the library so I am just including them as a raw git repo dependency in my package.json. The intent is to have it compiled together with the project when the app is building

However I am running on an issue, The ServiceCore.xcframework includes a framework folder inside it that contains some files, that for some reason I am having this issue

I am seeing that SCCDefines inside the framework folder of the ServiceCore

I am seeing that SCCDefines inside the framework folder of the ServiceCore

embedded framework

I have two hunches:

  • Either the Chat framework does not see its sibling dependency during build, hence ServiceCore not found

  • Or Core xcframework not including its embedded framework during build.

I am pulling my hair on this one. If this is on android side I would not have any issues at all since gradle is good at dependency management.

Thanks

0

There are 0 best solutions below