When packaging 3rd-party xcframeworks as separate React Native Library, Embedded Framework is not being included #439
Unanswered
silencer07
asked this question in
Q&A
Replies: 1 comment 11 replies
-
Hey, are you adding the |
Beta Was this translation helpful? Give feedback.
11 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
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 documentationI have already included and linked them in the generated project
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 issueI am seeing that SCCDefines inside the framework folder of the ServiceCore
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.
I also tried doing it altogether in podspec file and I am getting more error than the xcode way
This is in the library framework btw
I am having error
The folder is wrong because it is looking for the
prepare-framework
file which is in the /Users/aldrin/WebstormProjects/mobile-app/node-modules/react-native-mecca-chat-library/ios/Frameworks/ServiceCore.xcframework (basically missing the node-modules/react-native-mecca-chat-library in path)EDIT: Tried hardcoding the path, basically I am back to the error wherein the Core library is not found during build.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions