
I've created an example app at https://github.com/timmywil/react-native-async-storage-1.3.1
This app was created with react-native init and async-storage included with react-native link... && cd ios/ && pod install after creating a Podfile.
Building without pods seems to work fine, but if async-storage is included with pods, you get the error shown above.
Downgrading to 1.3.0 fixes the issue.
Open node_modules/@react-native-community/async-storage/ios/RNCAsyncStorage.h
On line 10, change
#import <RNCAsyncStorage/RNCAsyncStorageDelegate.h>
to
#import <RNCAsyncStorageDelegate.h>
Merged and released as 1.3.2: https://github.com/react-native-community/react-native-async-storage/pull/75#issuecomment-482943581.
Thanks, everyone 鉂わ笍 Let us know how you go.
I have tried to build without this module and it's working. I don't know, what is the fix for this. I am using latest version.
Its working if I am modifying file - RNCAsyncStorage.h. But getting error with other components
I have tried to manual linking and auto linking. Anyone having same issue ?
"@react-native-community/async-storage": "^1.4.1",
"react-native": "0.59.1",
xCode : 10.2.1
@codoffer I am also getting an error when I build without pods -- I get this error
/Users/me/PROJECTNAME/node_modules/@react-native-community/async-storage/ios/RNCAsyncStorage.h:10:9:'RNCAsyncStorage/RNCAsyncStorageDelegate.h' file not found
If i do the changes @dblazeski recommends (except I change the line to import "RNCAsyncStorageDelegate.h"), everything appears to work.
Manual linking and auto linking don't work, only changing that line in node_modules/@react-native-community/async-storage/ios/RNCAsyncStorage.h lets my project build
"@react-native-community/async-storage": "1.4.2",
"react-native": "0.59.3",
Yes, you are right. But its temporary fix. It was working fine before, On update of my node_modules, facing these issues.
@codoffer I am also getting an error when I build without pods -- I get this error
/Users/me/PROJECTNAME/node_modules/@react-native-community/async-storage/ios/RNCAsyncStorage.h:10:9:'RNCAsyncStorage/RNCAsyncStorageDelegate.h' file not foundIf i do the changes @dblazeski recommends (except I change the line to
import "RNCAsyncStorageDelegate.h"), everything appears to work.Manual linking and auto linking don't work, only changing that line in
node_modules/@react-native-community/async-storage/ios/RNCAsyncStorage.hlets my project build"@react-native-community/async-storage": "1.4.2",
"react-native": "0.59.3",
Hitting this bug on 1.4.2 and this seems to solve it for me. Are there any more people still facing this issue?
Most helpful comment
Open
node_modules/@react-native-community/async-storage/ios/RNCAsyncStorage.hOn line 10, change
#import <RNCAsyncStorage/RNCAsyncStorageDelegate.h>to
#import <RNCAsyncStorageDelegate.h>