Skip to content

RNSInfo doesnt have getItem or setItem in react native version 0.76 #428

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

Open
nishmitha03 opened this issue Jan 23, 2025 · 3 comments
Open

Comments

@nishmitha03
Copy link

import RNSInfo from 'react-native-sensitive-info';

export const fetchDataInfo = async (storageData: string) => { try { const response = await RNSInfo.getItem(storageData, SENSITIVE_INFO_OPTIONS); if (response && response !== null) { return JSON.parse(response); } else { return null; } } catch (e) { return null; } };

Here the console log of RNSInfo is below, the RNSInfo doesnt have getItem or setItem now
LOG RNSInfo {"cancelFingerprintAuth": [Function cancelFingerprintAuth], "setInvalidatedByBiometricEnrollment": [Function setInvalidatedByBiometricEnrollment]}

Im using the latest react native version 0.76.0 and facing issues here.

react-native: 0.76.0
react-native-sensitive-info: 5.5.8

Any assistance here would be helpful.

@alimoli
Copy link

alimoli commented Mar 31, 2025

Any update/fix about this?
Otherwise we can clearly define this library as dead.
Anyone found a fix for iOS?
I have react-native version 0.76.8 and it still works on Android.
However on iOS, I get:

[TypeError: 0, _$$_REQUIRE(_dependencyMap[2](...)-native-sensitive-info").getItem is not a function (it is undefined)]

This happens when I try to call getItem.

@nishmitha03
Copy link
Author

@alimoli I followed this #424 (comment) and it worked for me.

@alimoli
Copy link

alimoli commented Apr 1, 2025

@alimoli I followed this #424 (comment) and it worked for me.

Thank you for your message and the share! 🙏
Unfortunately, it does not solve my situation as my main issue are the "storage" functions like getItem which are still undefined.
I am trying to edit the code and see if I am able to fix it.
In that case, I will share my patch. 🤞

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

2 participants