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

Linking doesn't update MainApplication.java #188

Closed
Karsens opened this issue Jan 2, 2019 · 2 comments
Closed

Linking doesn't update MainApplication.java #188

Karsens opened this issue Jan 2, 2019 · 2 comments

Comments

@Karsens
Copy link

Karsens commented Jan 2, 2019

I had to manually add these lines to MainApplication.java after linking.

import com.rnfingerprint.FingerprintAuthPackage;

and
new FingerprintAuthPackage(),
(to getPackages())

I had to find out how the package is called by running the example and linking there, because in my project linking is broken. In the example, it works (after some trouble).

I think it would be better if you also add the manual way to link this project to your app for Android, not just for iOS because linking doesn't work for everyone.

Linking manually on Android is not that hard, just do the above, and:

  • add this to /android/app/build.gradle to the dependencies:
    compile project(':react-native-touch-id')
  • add this to /android/settings.gradle
    include ':react-native-touch-id' project(':react-native-touch-id').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-touch-id/android')
@ncmd
Copy link

ncmd commented Jan 23, 2019

you're a saint.

@zibs
Copy link
Collaborator

zibs commented Feb 15, 2019

Are you sure? I've just done this on 4.3.0 and 4.4.0. Running yarn add react-native-touch-id and then running react-native link linked everything fine on my end.

Let me know if this didn't work for you.

@zibs zibs closed this as completed Feb 15, 2019
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

No branches or pull requests

3 participants