react-native-keychain
react-native-keychain copied to clipboard
UI animation freezing when calling any `set` functions in Android
The UI animation freezes for around 200-300ms when calling any set functions in Android.
Minimal reproducible example
HomeScreen.tsx
export default function HomeScreen() {
return (
<View>
<TouchableOpacity onPress={() => KeyChain.setInternetCredentials('name', 'username', 'password')}>
<Text>Set keychain</Text>
</TouchableOpacity>
</View>
);
}
Problem
I think the encryptString function should be run on another thread because the stream handling method causes the UI thread to block.
https://github.com/oblador/react-native-keychain/blob/4d88b620756f337de0e91aaac7ad4ffa3a4cb14e/android/src/main/java/com/oblador/keychain/cipherStorage/CipherStorageBase.java#L340-L367
Thank you for your attention.
this is a very urgent issue
Fixed in 9.0.0