Async-storage: Recent 1.3.1 release breaks iOS build if linked with pods

Created on 12 Apr 2019  路  6Comments  路  Source: react-native-async-storage/async-storage

Screenshot 2019-04-12 14 45 19

Repro steps

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.

Environment

  • Async Storage version: 1.3.1
  • React-Native version: 0.59.4
  • Platform tested: iOS only
PR ready bug iOS

Most helpful comment

Open node_modules/@react-native-community/async-storage/ios/RNCAsyncStorage.h
On line 10, change
#import <RNCAsyncStorage/RNCAsyncStorageDelegate.h>
to
#import <RNCAsyncStorageDelegate.h>

All 6 comments

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

import "RNCAsyncStorageDelegate.h"

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 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",

Hitting this bug on 1.4.2 and this seems to solve it for me. Are there any more people still facing this issue?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

santhanakrishnanstark picture santhanakrishnanstark  路  67Comments

sumanthyedoti picture sumanthyedoti  路  25Comments

mxmzb picture mxmzb  路  19Comments

dominiczaq picture dominiczaq  路  22Comments

Alaa-Ben picture Alaa-Ben  路  20Comments