Add support to register New Renderer components from the AppDelegate.#37273
Add support to register New Renderer components from the AppDelegate.#37273cipolleschi wants to merge 2 commits into
Conversation
|
This pull request was exported from Phabricator. Differential Revision: D45605688 |
Base commit: d8ced6f |
27ee527 to
e0ef0fd
Compare
|
This pull request was exported from Phabricator. Differential Revision: D45605688 |
e0ef0fd to
cce76e1
Compare
|
This pull request was exported from Phabricator. Differential Revision: D45605688 |
cce76e1 to
25a9d58
Compare
|
This pull request was exported from Phabricator. Differential Revision: D45605688 |
|
This pull request was exported from Phabricator. Differential Revision: D45605688 |
25a9d58 to
b6dd875
Compare
b6dd875 to
c5d4f6e
Compare
|
This pull request was exported from Phabricator. Differential Revision: D45605688 |
c5d4f6e to
ab3ce22
Compare
|
This pull request was exported from Phabricator. Differential Revision: D45605688 |
|
This pull request was exported from Phabricator. Differential Revision: D45605688 |
44b8475 to
794ecff
Compare
|
This pull request was exported from Phabricator. Differential Revision: D45605688 |
794ecff to
79256e5
Compare
|
This pull request was exported from Phabricator. Differential Revision: D45605688 |
79256e5 to
64be32f
Compare
|
This pull request was exported from Phabricator. Differential Revision: D45605688 |
64be32f to
23d6d61
Compare
|
This pull request was exported from Phabricator. Differential Revision: D45605688 |
|
This pull request was exported from Phabricator. Differential Revision: D45605688 |
23d6d61 to
8b2f036
Compare
…namic Libraries (facebook#37274) Summary: Pull Request resolved: facebook#37274 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 ``` + (void)load { [super load]; } ``` 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: https://internalfb.com/D45605441 fbshipit-source-id: a55c9cfa2b09d539fd9e38337493d2341461fdf3
…facebook#37273) Summary: Pull Request resolved: facebook#37273 When using dynamic frameworks, we can't rely on Codegen to register all the components into the renderer. That's because, we would have to codegen a new target, which depends on ALL the 3rd party dependencies that expose a UI component. The previous PR adds support for distributed automatic registration when components are loaded in memory. However, not to slow down the adoption of the New Architecture, there could be apps that need to register a component that does not support the distributed approach yet. Thanks to this method, apps can register those components. ## Changelog: [iOS][Added] - Added a mechanism to register components into the renderer from the user app. Reviewed By: dmytrorykun Differential Revision: D45605688 fbshipit-source-id: 05e40ef3ac302647ea55f37c3260ca9234791c85
…facebook#37273) Summary: Pull Request resolved: facebook#37273 When using dynamic frameworks, we can't rely on Codegen to register all the components into the renderer. That's because, we would have to codegen a new target, which depends on ALL the 3rd party dependencies that expose a UI component. The previous PR adds support for distributed automatic registration when components are loaded in memory. However, not to slow down the adoption of the New Architecture, there could be apps that need to register a component that does not support the distributed approach yet. Thanks to this method, apps can register those components. ## Changelog: [iOS][Added] - Added a mechanism to register components into the renderer from the user app. Differential Revision: https://www.internalfb.com/diff/D45605688?entry_point=27 fbshipit-source-id: b68e8582a6c220d79236ab9425d46f45c6b0f3f1
8b2f036 to
71ba41a
Compare
|
This pull request was exported from Phabricator. Differential Revision: D45605688 |
|
This pull request has been merged in ce116b6. |
Summary:
When using dynamic frameworks, we can't rely on Codegen to register all the components into the renderer. That's because, we would have to codegen a new target, which depends on ALL the 3rd party dependencies that expose a UI component.
The previous PR adds support for distributed automatic registration when components are loaded in memory.
However, not to slow down the adoption of the New Architecture, there could be apps that need to register a component that does not support the distributed approach yet. Thanks to this method, apps can register those components.
Changelog:
[iOS][Added] - Added a mechanism to register components into the renderer from the user app.
Differential Revision: D45605688