react-native-aes-kit icon indicating copy to clipboard operation
react-native-aes-kit copied to clipboard

AesCrypto.encrypt is not a function.

Open ashish-dhiman opened this issue 5 years ago • 3 comments

I am creating a react native project with expo. When I try to run the sample code, I encounter the said error "[Unhandled promise rejection: TypeError: AesCrypto.encrypt is not a function. (In 'AesCrypto.encrypt(plaintxt, secretKey, iv)', 'AesCrypto.encrypt' is undefined)]".

ashish-dhiman avatar Apr 25 '19 05:04 ashish-dhiman

Any updates to that issue?

Rotarepmi avatar Jun 24 '19 10:06 Rotarepmi

Have you ejected your app? I don't think this works on Expo projects.

michelegoh avatar Jun 27 '19 03:06 michelegoh

Yup it won't work on Expo. You have to use plain react-native or ExpoKit. While using ExpoKit you have to publish the project first and then you can use ./android/gradlew installDebug. Should work fine :)

Rotarepmi avatar Jul 03 '19 21:07 Rotarepmi