You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Duplicate symbols when building using new spm_dependency even when using USE_FRAMEWORKS=dynamic during pod install #47344
Adding the https://github.com/eu-digital-identity-wallet/eudi-lib-ios-iso18013-data-transfer.git package to a react native project using the new spm_dependency method available in podpsecs causes Duplicate symbols issue when building, even using USE_FRAMEWORKS=dynamic
The error is 18460 duplicate symbols.
The PR that added support for this (#44627) mentions the duplicate symbols can be fixed by using USE_FRAMEWORKS=dynamic during pod install, but this does not seem to address the issue.
Steps to reproduce
The reproduction repo is a freshly initialized react native project on 0.76.1, with the most minimal local module added just to add the podspec loading.
@mfazekas as the original author of the new spm_dependency feature (thanks for that!), do you have an idea why the duplicate symbols error still comes up even though USE_FRAMEWORKS=dynamic is used?
@TimoGlastra sorry no. Note that spm_dependency is not magic. It's add the package dependency to the Xcode workspace, and it also links the pod with the dependency - see the example in #44627 (comment). All stuff you can do by hand with Xcode.
So if you can figure out what Xcode settings changes needed so you won't have duplicate symbols then it's likely can be implemented.
Thanks for the quick response @mfazekas. And your suggestions helped.
I was able to track down the issue, my podspec defined static_framework true, which diddn't work with using a dynamic framework for swift packages
The other problem I now have is that ExpoModuleCore is a static framework and a dynamic framework can't depend on a static framework, but to use SPM packages we need it be dynamic -- but that's another issue for the expo repo.
Thanks for the quick response @mfazekas. And your suggestions helped.
I was able to track down the issue, my podspec defined static_framework true, which diddn't work with using a dynamic framework for swift packages
The other problem I now have is that ExpoModuleCore is a static framework and a dynamic framework can't depend on a static framework, but to use SPM packages we need it be dynamic -- but that's another issue for the expo repo.
Let us know if you figure out using spm_dependency with custom expo modules 👍
Activity
TimoGlastra commentedon Oct 31, 2024
@mfazekas as the original author of the new
spm_dependencyfeature (thanks for that!), do you have an idea why theduplicate symbolserror still comes up even thoughUSE_FRAMEWORKS=dynamicis used?mfazekas commentedon Oct 31, 2024
@TimoGlastra sorry no. Note that spm_dependency is not magic. It's add the package dependency to the Xcode workspace, and it also links the pod with the dependency - see the example in #44627 (comment). All stuff you can do by hand with Xcode.
So if you can figure out what Xcode settings changes needed so you won't have duplicate symbols then it's likely can be implemented.
TimoGlastra commentedon Nov 1, 2024
Thanks for the quick response @mfazekas. And your suggestions helped.
I was able to track down the issue, my podspec defined
static_frameworktrue, which diddn't work with using a dynamic framework for swift packagesThe other problem I now have is that ExpoModuleCore is a static framework and a dynamic framework can't depend on a static framework, but to use SPM packages we need it be dynamic -- but that's another issue for the expo repo.
hietalajulius commentedon Nov 2, 2024
Let us know if you figure out using
spm_dependencywith custom expo modules 👍TimoGlastra commentedon Nov 2, 2024
For now i just created a turbo module and skipped expo modules as that seems to work alright and I already lost about a week of time on this 😅
If i have the time i want to create a minimal expo reproduction and open an issue. But i think changes are needed in Expo modules to support this.
I quickly tried modifying the expo modules and removing the static_framework but that broke a lot of other things
fix(ios): force only MdocDataTransfer to dynamic linking, keep rest s…