[iOS] Cannot get data set by react-native's AsyncStorage
See original GitHub issueCurrent behavior
- On iOS, data (set by react-native core’s AsyncStorage) cannot be accessed from this library’s AsyncStorage.
Expected behavior
- Data can be accessed from both AsyncStorage.
Repro steps
react-native init Sample --version 0.59.0
yarn add @react-native-community/async-storage@1.2.1
- Use
AsyncStorage
inreact-native
and set data usingAsyncStorage.setItem
- then Use
AsyncStorage
in@react-native-community/async-storage
and get data usingAsyncStorage.getItem
Environment
- Async Storage version: 1.2.1
- React-Native version: 0.59.0
- Platform tested: iOS
- Logs/Error that are relevant:
Issue Analytics
- State:
- Created 5 years ago
- Reactions:4
- Comments:7 (4 by maintainers)
Top Results From Across the Web
[iOS] Cannot get data set by react-native's AsyncStorage #40
Current behavior On iOS, data (set by react-native core's AsyncStorage) cannot be accessed from this library's AsyncStorage.
Read more >ReactNative: AsyncStorage Problem : I can't retrieve Data the ...
You are printing an async function without awaiting for it. The code is correct, but the console log is not correct: console.log(getData(), ' ......
Read more >AsyncStorage - React Native
On iOS, AsyncStorage is backed by native code that stores small values in a serialized dictionary and larger values in separate files.
Read more >React Native Async Storage - npm
An asynchronous, unencrypted, persistent, key-value storage system for React Native. Supported platforms. iOS; Android; Web · MacOS · Windows ...
Read more >How To Use React Native AsyncStorage - JScrambler Blog
AsyncStorage is a simple, asynchronous, unencrypted by default module that allows you to persist data offline in React Native apps.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
That must have been the whirlwind of changes I did while detaching from RN Core. I’m happy to revert it back, merge and release it, then think about adding a feature to change it in the future.
Let me know if anyone would like to work on it or should I do it.
Thanks.
Hi @ohnishiakira , thanks for your input!
I believe this is because we’ve changed the name of a directory, where data is being saved.
This is our current name
react-native version
I cannot test it right now, but I’d like to see if it’s the case.