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.

Setup async-storage for macOS

See original GitHub issue

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:

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
nikgrafcommented, Apr 13, 2021

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

0reactions
mmazzarolocommented, Sep 8, 2021

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 👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

Installation | Async Storage - GitHub Pages
Set platform :macos, '10.14' in macos/Podfile · Install the pods · From now on CLI autolink feature will link the module while building...
Read more >
React native async storage mac OS pod install failing
The RNCAsyncStorage 's min deployment target is 9.0. Change the line in podfile to 9 or later. And I suggest marking it to...
Read more >
React Native Async Storage - GitHub
React Native Async Storage. An asynchronous, unencrypted, persistent, key-value storage system for React Native. Supported platforms.
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 >
A guide to React Native's AsyncStorage - LogRocket Blog
AsyncStorage is an unencrypted and asynchronous data storage ... How AsyncStorage works; How to install AsyncStorage; AsyncStorage methods.
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