question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[iOS] Cannot get data set by react-native's AsyncStorage

See original GitHub issue

Current 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 in react-native and set data using AsyncStorage.setItem
  • then Use AsyncStorage in @react-native-community/async-storage and get data using AsyncStorage.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:closed
  • Created 5 years ago
  • Reactions:4
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

9reactions
krizzucommented, Mar 19, 2019

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.

3reactions
krizzucommented, Mar 15, 2019

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found