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
React-Native-MacOS does not support use_frameworks!, :linkage => :dynamic #1969
I managed to have them working with :linkage => :static and the Old Architecture in this PR.
I then started looking into :linkage => :dynamic in the Old Architecture and I hit a wall. MacOS has some circular dependencies that needs to be fixed as dynamic frameworks need to be able to build in isolation and circular dependencies prevent that, unfortunately.
NO_FLIPPER=1 USE_FRAMEWORKS=dynamic bundle exec pod install
open RNTestProject.xcworkspace
Select the RNTester-MacOS target
cmd + B
Additional context
On mobile, use_frameworks! is a requirement for Firebase, for example. Perhaps Firebase is not compatible with MacOS?
Or aren't there libraries which requires that to be turned on?
Enabling and supporting Swift, requires a folder structure which is exactly the one enforced by frameworks (Clang modules) so it make sense to make sure we support it.
Dynamic frameworks will also catch those circular dependencies automatically!
No workaround / solution at the moment. For my own knowledge, what kind of issue do you run into when you try to use something like CocoaAsyncSocket without frameworks?
As described in this issue, :linkage => :dynamic fails due to circular deps between React-Core and React-RCTText.
I also tried :linkage => :static but that breaks too — React-Fabric fails to build with 'react/renderer/components/view/KeyEvent.h' file not found. The problem is that the view subspec includes headers from both platform/cxx/ and platform/macos/, and with use_frameworks! the compiler picks up the wrong (cxx) version instead of the macOS one.
Is there any plan to fix use_frameworks! support for macOS? We're on react-native-macos 0.81.4.
Gregory Moskaliuk (@hryhoriiK97) Prior to your comment, I had no plans to fix this as apart from firebase I hadn't seen much usage of dynamic linkning apart from firebase. Now that I see it blocks SPM deps, I will take another look. Unsure it'll land with our next release (0.83), but maybe right after and I'll backport? Thank you for bringing to my attention!
Hello Gregory Moskaliuk (@hryhoriiK97) I have the changes to support dynamic frameworks here #2943
They are quite big, and I wanted to double check if they were still necessaryy for enriched markdown so I decide how / when to land them?
Hi Saad Najmi (@Saadnajmi), yes, this is a big blocker for us right now. We disabled LaTeX support for macOS in 0.7.0, so if you can push this, we'd appreciate it so much 🙌
Activity
maksimlya commentedon Jun 4, 2024
Hi, I just got this issue as well. I need this to be able to use CocoaAsyncSocket library. Any workaround/solution?
Saadnajmi commentedon Jun 4, 2024
No workaround / solution at the moment. For my own knowledge, what kind of issue do you run into when you try to use something like CocoaAsyncSocket without frameworks?
maksimlya commentedon Jun 4, 2024
https://github.com/robbiehanson/CocoaAsyncSocket
According to their instructions, if I want to run it from swift I need to add the framework:
Without adding the framework, Swift simply cannot find the lib.
But it's ok, since I just downloaded the source code and linked it manually to the project. TCP works fine, thx for the help.
hryhoriiK97 commentedon Jun 25, 2026
Hey Saad Najmi (@Saadnajmi), I ran into this issue while working on react-native-enriched-markdown. We need
use_frameworks!to integrate an SPM dependency (RaTeX for LaTeX math rendering) via CocoaPods'spm_dependency.As described in this issue,
:linkage => :dynamicfails due to circular deps betweenReact-CoreandReact-RCTText.I also tried
:linkage => :staticbut that breaks too —React-Fabricfails to build with'react/renderer/components/view/KeyEvent.h' file not found. The problem is that theviewsubspec includes headers from bothplatform/cxx/andplatform/macos/, and withuse_frameworks!the compiler picks up the wrong (cxx) version instead of the macOS one.Is there any plan to fix
use_frameworks!support for macOS? We're on react-native-macos 0.81.4.docs: document macOS LaTeX math limitation (#441)
Saadnajmi commentedon Jun 25, 2026
Gregory Moskaliuk (@hryhoriiK97) Prior to your comment, I had no plans to fix this as apart from firebase I hadn't seen much usage of dynamic linkning apart from firebase. Now that I see it blocks SPM deps, I will take another look. Unsure it'll land with our next release (0.83), but maybe right after and I'll backport? Thank you for bringing to my attention!
Saadnajmi commentedon Jul 10, 2026
Hello Gregory Moskaliuk (@hryhoriiK97) I have the changes to support dynamic frameworks here #2943
They are quite big, and I wanted to double check if they were still necessaryy for enriched markdown so I decide how / when to land them?
hryhoriiK97 commentedon Jul 10, 2026
Hi Saad Najmi (@Saadnajmi), yes, this is a big blocker for us right now. We disabled LaTeX support for macOS in 0.7.0, so if you can push this, we'd appreciate it so much 🙌
feat: add support for dynamic frameworks (microsoft#2943)
Saadnajmi commentedon Oct 12, 2026
Gregory Moskaliuk (@hryhoriiK97) 0.83 is released