Add support for distributed registration of Fabric Components with Dynamic Libraries#37274
Add support for distributed registration of Fabric Components with Dynamic Libraries#37274cipolleschi wants to merge 1 commit into
Conversation
|
This pull request was exported from Phabricator. Differential Revision: D45605441 |
Base commit: d8ced6f |
|
This pull request was exported from Phabricator. Differential Revision: D45605441 |
61b1f55 to
7f18b34
Compare
|
This pull request was exported from Phabricator. Differential Revision: D45605441 |
1 similar comment
|
This pull request was exported from Phabricator. Differential Revision: D45605441 |
c217037 to
a5d9ba3
Compare
|
This pull request was exported from Phabricator. Differential Revision: D45605441 |
1 similar comment
|
This pull request was exported from Phabricator. Differential Revision: D45605441 |
2391be1 to
debdc1e
Compare
|
This pull request was exported from Phabricator. Differential Revision: D45605441 |
1 similar comment
|
This pull request was exported from Phabricator. Differential Revision: D45605441 |
e9ffaba to
19e8c85
Compare
|
This pull request was exported from Phabricator. Differential Revision: D45605441 |
19e8c85 to
fd71eab
Compare
|
This pull request was exported from Phabricator. Differential Revision: D45605441 |
fd71eab to
b1ed970
Compare
|
This pull request was exported from Phabricator. Differential Revision: D45605441 |
b1ed970 to
0f6581b
Compare
|
This pull request was exported from Phabricator. Differential Revision: D45605441 |
0f6581b to
45e8598
Compare
|
This pull request was exported from Phabricator. Differential Revision: D45605441 |
45e8598 to
a1d2e30
Compare
|
This pull request was exported from Phabricator. Differential Revision: D45605441 |
|
This pull request has been merged in b6b09a7. |
## PR concerning New Architecture support in the library 🎉 We at [Software Mansion](https://swmansion.com/) have been working on [improving support](https://blog.swmansion.com/sunrising-new-architecture-in-the-new-expensify-app-729d237a02f5) for the new architecture for quite a while now. If you need help with anything related to New Architecture, like: - [migrating your library](https://x.com/swmansion/status/1717512089323864275) - [migrating your app](Expensify/App#13767) - [investigating issues](https://github.com/facebook/react-native/pulls?q=sort%3Aupdated-desc+is%3Apr+author%3Aj-piasecki+is%3Aopen) - [improving performance](https://x.com/BBloniarz_/status/1808138585528303977) or you just want to ask any questions, hit us up on [projects@swmansion.com](mailto:projects@swmansion.com) --- ## Summary <!-- Simple summary of what was changed. --> PR adding `load` method needed for dynamic frameworks to work with the library. See react/react-native#37274 for more information.
## PR concerning New Architecture support in the library 🎉 We at [Software Mansion](https://swmansion.com/) have been working on [improving support](https://blog.swmansion.com/sunrising-new-architecture-in-the-new-expensify-app-729d237a02f5) for the new architecture for quite a while now. If you need help with anything related to New Architecture, like: - [migrating your library](https://x.com/swmansion/status/1717512089323864275) - [migrating your app](Expensify/App#13767) - [investigating issues](https://github.com/facebook/react-native/pulls?q=sort%3Aupdated-desc+is%3Apr+author%3Aj-piasecki+is%3Aopen) - [improving performance](https://x.com/BBloniarz_/status/1808138585528303977) or you just want to ask any questions, hit us up on [projects@swmansion.com](mailto:projects@swmansion.com) --- ## Summary <!-- Simple summary of what was changed. --> PR adding `load` method needed for dynamic frameworks to work with the library. See react/react-native#37274 for more information.
PR adding load method needed for dynamic frameworks to work with the library. See react/react-native#37274 for more information.
PR adding `load` method needed for dynamic frameworks to work with the library. See react/react-native#37274 for more information.
PR adding load method needed for dynamic frameworks to work with the library. See react/react-native#37274 for more information.
PR adding load method needed for dynamic frameworks to work with the library. See react/react-native#37274 for more information. (cherry picked from commit 29c98e2)
Summary:
With dynamic frameworks, we can't use floating C functions.
The way in which dynamic frameworks work is that they need to be self contained. They are built in isolation so that other frameworks can be linked against them to solve their dependencies.
Currently, when working with 3rd party libraries, we are Codegenerating a RCTThirdPartyComponentProvider which tries to invoke floating C functions that are defined in other modules. React-RCTFabric has no visibility on those modules, therefore it fails building.
The implemented solution exclude the generation of those symbols and leverage a the Objective-C runtime to automatically register libraries when they are loaded.
This mechanism is applied ONLY when the flag RCT_DYNAMIC_FRAMEWORKS is turned on. There will be no impact on internal meta apps, nor on any apps that are not using Dynamic Frameworks.
This change requires a small migration in all the Fabric components libraries that wants to support dynamic frameworks. They have to implement a
method in their ComponentView.
Not to slow down the adoption of the new architecture, waiting for a migration in the ecosystem, the next diff introduce a secondary, declarative loading mechanism for Fabric Components, which follows the same approach used by TurboModules.
Changelog:
[iOS][Changed] - Add support for distributed registration of Fabric Components with Dynamic Libraries.
Notes that this change is NOT breaking as dynamic frameworks were not working before in the New Architecture. Static Libraries and Static Frameworks continue working as usual.
Differential Revision: D45605441