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
Research and implement Branch as an optional module on Android #5132
Comments
added turtle support here expo/turtle@7a80d92 Unimodule |
sjchmiela
added a commit
that referenced
this issue
Aug 6, 2019
# Why We would like to provide a way to users to optionally include `react-native-branch` in their standalone apps. Fixes #5132. # How I added support for React Native-specific unimodules to React Native adapter. Right now it works like this: - unimodule `expo-branch` depends on `react-native`, so it can use its API. It's no longer a uni-platform module, more an optinmodule (I guess the name won't stick) - we copy `react-native-branch` vendored module directly to the unimodule. It will compile, since we added necessary dependencies to the unimodule - `BranchPackage < org.unimodules.Package` implements `ReactPackage` interface too, forwarding all the calls to the vendored `RNBranchPackage`. - when the module registry provider creates a module registry from a list of `Packages`, it can filter out `ReactPackages` — and so it does, putting them into a local internal module (`ReactPackagesProvider`) which only purpose is to carry those to `ModuleRegistryAdapter` which is responsible for creating a list of React Native modules out of a module registry. The adapter grabs the `ReactPackagesProvider` and adds React Native modules to the list. # Test Plan I have confirmed that adding `BranchPackage` to a list of installed unimodules' packages creates `RNBranchModule` and exports to JS.
sjchmiela
added a commit
that referenced
this issue
Aug 6, 2019
We would like to provide a way to users to optionally include `react-native-branch` in their standalone apps. Fixes #5132. I added support for React Native-specific unimodules to React Native adapter. Right now it works like this: - unimodule `expo-branch` depends on `react-native`, so it can use its API. It's no longer a uni-platform module, more an optinmodule (I guess the name won't stick) - we copy `react-native-branch` vendored module directly to the unimodule. It will compile, since we added necessary dependencies to the unimodule - `BranchPackage < org.unimodules.Package` implements `ReactPackage` interface too, forwarding all the calls to the vendored `RNBranchPackage`. - when the module registry provider creates a module registry from a list of `Packages`, it can filter out `ReactPackages` — and so it does, putting them into a local internal module (`ReactPackagesProvider`) which only purpose is to carry those to `ModuleRegistryAdapter` which is responsible for creating a list of React Native modules out of a module registry. The adapter grabs the `ReactPackagesProvider` and adds React Native modules to the list. I have confirmed that adding `BranchPackage` to a list of installed unimodules' packages creates `RNBranchModule` and exports to JS.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Recently we've removed Branch from Android (more details in the blog post) but we'd like to provide a way to include this module if someone wants to do a build with it, maybe as a
--include-branch
flag toexpo build:android
command.Pull request removing Branch code for reference: #4058
The text was updated successfully, but these errors were encountered: