Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal: Add autolinking support #306

Closed
wants to merge 2 commits into from
Closed

Conversation

JeroenMols
Copy link
Collaborator

@JeroenMols JeroenMols commented Jan 15, 2021

Investigate a community request to support autolinking on Android: #299

It seems like react native supports two kind of Android modules: Native Modules and Turbo Modules (still in development).

As the name implies, Turbo modules are faster to initialize which speeds up cold start of react native apps. However they are still under development, even though already introduced since react native 0.60.0.

While I couldn't find a conclusive answer on this, it seems like Turbo Modules don't support autolinking (yet?). So this means we have to make a choice between either:

  • Keep the existing Turbo modules: makes our SDK faster to initialize, but slightly harder to integrate
  • Move back to Native modules: makes our SDK slower to initialize, but easier to integrate

This PR follows the steps to create a Native Module and makes autolinking work for our react native SDK.

We're looking for community feedback/guidance on how to proceed on this.

Note: interestingly, Lottie react native uses the Native Module

@JeroenMols JeroenMols changed the title Add support for autolinking Proposal: Add autolinking support Jan 15, 2021
@JeroenMols
Copy link
Collaborator Author

We've decided to stick to turbo modules for now as faster app initialization outweighs the easier integration (especially on the longer term)

In the future we may decide to revise this or to add auto linking support for Turbo Modules. (when that becomes possible)

@djMax
Copy link

djMax commented Mar 7, 2023

are you sure that it's not autolinking now? Because if I add it to MainApplication.java, I get an error saying it has already been linked.

@dtroupe-plaid dtroupe-plaid deleted the investigate-autolinking branch March 31, 2023 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants