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

Updated installation guide #10

Open
zirlman opened this issue Oct 22, 2020 · 0 comments
Open

Updated installation guide #10

zirlman opened this issue Oct 22, 2020 · 0 comments

Comments

@zirlman
Copy link

zirlman commented Oct 22, 2020

After a lot of struggle, I've managed to install your library. Based on the issues I've had, I'll explain here what I've done to successfully install the library. Also, this is a suggestion to edit the current readme file.

  1. In the Getting started guide, please add this line for installation via npm: npm install https://github.com/quan-to/react-native-pbkdf2
  2. After installation link the library (react-native link react-native-pbkdf2), even though newer versions of react-native support auto link
  3. Add PBKDF2 to your project:
import PBKDF2 from 'react-native-pbkdf2'
PBKDF2.derivationKey('P4S5W0RD', '032145', 10000)
  .then((derivationKey) => console.log(`Derivation key: ${derivationKey}`))
  .catch((err) => console.error(err));

⚠ Readme edit suggestion:

  1. Add installation via npm, as described above
  2. No need to add new PBKDF2Package() in the getPackages() method. You only need to import the module
  3. Replace compile with api since compile is deprecated
  4. During the installation I've encountered a Too many field references. Check out minSdkVersion in your android/src/build.gradle if the number is below 21, you need to add multiDexEnabled true flag after the specified version
defaultConfig {
        ...
        minSdkVersion 15 
        targetSdkVersion 28
        👉 multiDexEnabled true
    }
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

1 participant