Closed schie closed 4 years ago
@schie Autolinking is not working. If you want to make it work on android with RN 0.60+:
android/app/build.gradle
:
dependencies {
// Add this dependency:
compile project(":reactnativekeyboardinput")
}
android/settings.gradle
:
include ':reactnativekeyboardinput'
project(':reactnativekeyboardinput').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-keyboard-input/lib/android')
MainApplication.java
, add:
import com.wix.reactnativekeyboardinput.KeyboardInputPackage;
MainApplication.java
, add to the following function:
private MainApplication getThis() {
return this;
}
MainApplication.java
, inside getPackages()
add:
packages.add(new KeyboardInputPackage(getThis()));
See my MainApplication.java
example:
I did not find a solution to make it work on iOS with RN 0.60+. Manual linking from README doesn't work for RN 0.60+.
EDIT:
You can simply just skip STEP 4 and at STEP 5 just use packages.add(new KeyboardInputPackage(this.getApplication()));
instead packages.add(new KeyboardInputPackage(getThis()));
Hi @schie,
We are in the process of migrating this library, it is not yet complete, but the auto linking works there.
Thanks @ggunti for the help, we're not going to fix this here, sorry.
@ggunti my issue is as I import the KeyboardInputPackage, it says the package does not exist even after syncing the project with the Gradle files. Any solutions regarding this will be appreciated. Thank you.
Does this work react native's Auto Linking?
I didn't see anything in the documentation but manual installation.