Skip to content

Setup async-storage for macOS #587

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
1 of 4 tasks
nikgraf opened this issue Apr 12, 2021 · 5 comments
Closed
1 of 4 tasks

Setup async-storage for macOS #587

nikgraf opened this issue Apr 12, 2021 · 5 comments

Comments

@nikgraf
Copy link

nikgraf commented Apr 12, 2021

Current behavior

I followed the steps here https://react-native-async-storage.github.io/async-storage/docs/link/#macos

Everything until the 4th step is clear. Then I added the libRNCAsyncStorage-macOS.a in the Build Phases
of the target desktop-macOS.

When I run npx react-native run-macos I get this error. What's odd is is that this is referencing the ios directory.

/node_modules/@react-native-async-storage/async-storage/ios/RNCAsyncStorage.h:10:9: fatal error: 'React/RCTBridgeModule.h' file not found
#import <React/RCTBridgeModule.h>
        ^~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.

Expected behavior

Get

Repro steps

Can provide an example repo in case the above description doesn't help.

Environment

  • Platforms tested:
    • Android
    • iOS
    • macOS
    • Windows
  • AsyncStorage version: 1.15.2
  • Expo version:
  • Environment:
System:
    OS: macOS 11.1
    CPU: (8) x64 Apple M1
    Memory: 294.54 MB / 16.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 14.15.1 - ~/.nvm/versions/node/v14.15.1/bin/node
    Yarn: 1.22.10 - /usr/local/bin/yarn
    npm: 6.14.8 - ~/.nvm/versions/node/v14.15.1/bin/npm
    Watchman: Not Found
  Managers:
    CocoaPods: 1.10.1 - /usr/local/bin/pod
  SDKs:
    iOS SDK:
      Platforms: iOS 14.4, DriverKit 20.2, macOS 11.1, tvOS 14.3, watchOS 7.2
    Android SDK: Not Found
  IDEs:
    Android Studio: Not Found
    Xcode: 12.4/12D4e - /usr/bin/xcodebuild
  Languages:
    Java: Not Found
    Python: 2.7.16 - /usr/bin/python
  npmPackages:
    @react-native-community/cli: Not Found
    react: 16.13.1 => 16.13.1 
    react-native: 0.63.4 => 0.63.4 
    react-native-macos: ^0.63.0-0 => 0.63.23 
  npmGlobalPackages:
    *react-native*: Not Found
  • Logs/Errors that may be relevant:
@tido64
Copy link
Member

tido64 commented Apr 13, 2021

@nikgraf If you're on 0.63, autolinking should just work. You don't need to do the manual steps.

@nikgraf
Copy link
Author

nikgraf commented Apr 13, 2021

ahhh right, I had to change platform :macos, '10.14' but then it worked. Thanks for the info!

@nikgraf nikgraf closed this as completed Apr 13, 2021
@haveamission
Copy link

@nikgraf So you didn't have to link manually? This page seems to suggest you still seem to:

https://react-native-async-storage.github.io/async-storage/docs/link

Is this out of date?

@nikgraf
Copy link
Author

nikgraf commented Jul 2, 2021

correct

@mmazzarolo
Copy link
Contributor

ahhh right, I had to change platform :macos, '10.14' but then it worked. Thanks for the info!

+1, changing platform :macos, '10.14' in Podfile and running pod install auto-links correctly 👍

mmazzarolo added a commit to mmazzarolo/async-storage that referenced this issue Sep 22, 2021
Since React Native for macOS 0.63, autolink works (as long as `platform :macos, '10.14'` is set in Podfile

See react-native-async-storage#587
tido64 pushed a commit that referenced this issue Sep 27, 2021
Since React Native for macOS 0.63, autolink works (as long as `platform :macos, '10.14'` is set in Podfile

See #587
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants