Skip to content

Updated installation guide #10

Description

@zirlman

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
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions