Skip to content

Recent 1.3.1 release breaks iOS build if linked with pods #73

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

Closed
timmywil opened this issue Apr 12, 2019 · 6 comments
Closed

Recent 1.3.1 release breaks iOS build if linked with pods #73

timmywil opened this issue Apr 12, 2019 · 6 comments
Assignees
Labels
bug Something isn't working platform: iOS This is iOS specific

Comments

@timmywil
Copy link

timmywil commented Apr 12, 2019

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
@dblazeski
Copy link

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

dblazeski added a commit to dblazeski/react-native-async-storage that referenced this issue Apr 12, 2019
@krizzu krizzu added bug Something isn't working platform: iOS This is iOS specific labels Apr 13, 2019
@tido64 tido64 self-assigned this Apr 13, 2019
krizzu pushed a commit that referenced this issue Apr 14, 2019
Summary:
---------

Multiple people have reported that RNCAsyncStorage fails to build after #35. See #35 (comment), #73, and #74.

After a little discussion, we agreed to rename the `.podspec` and the name of the Pod to be more in line with Apple's naming guidelines and the rest of the community. Unfortunately, this means that the next upgrade will break.

I got a little impatient knowing that I broke the latest release so I went ahead and implemented the fix. Sorry if you've already started looking at this.

Migration Plan:
---------------

Even though `react-native link` will be able to link the new `.podspec`, it won't clean up existing entries. Please find your Podfile, and make the following changes:

```diff
- pod 'react-native-async-storage', :path => '../node_modules/@react-native-community/async-storage'
+ pod 'RNCAsyncStorage', :path => '../node_modules/@react-native-community/async-storage'
```
@tido64
Copy link
Member

tido64 commented Apr 14, 2019

Merged and released as 1.3.2: #75 (comment).

Thanks, everyone ❤️ Let us know how you go.

@codoffer
Copy link

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

@chiaberry
Copy link

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

@codoffer
Copy link

Yes, you are right. But its temporary fix. It was working fine before, On update of my node_modules, facing these issues.

@lessp
Copy link

lessp commented Jun 3, 2019

@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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working platform: iOS This is iOS specific
Projects
None yet
Development

No branches or pull requests

7 participants