Skip to content

Proposal: Add autolinking support - #306

Closed
JeroenMols wants to merge 2 commits into
masterfrom
investigate-autolinking
Closed

JeroenMols wants to merge 2 commits into
masterfrom
investigate-autolinking

Conversation

@JeroenMols

@JeroenMols JeroenMols commented Jan 15, 2021 •

Copy link
Copy Markdown
Collaborator

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
Copy Markdown
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

djMax commented Mar 7, 2023

Copy link
Copy Markdown

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