Search code examples
react-nativenpmcocoapodsasyncstoragepodfile

React Native: do you have to do manual linking for AsyncStorage?


I'm following this guide for adding AsyncStorage to my React Native app. I'm using react native v0.63.4, but I'm using a Mac, so I'm wondering whether the manual linking that they cite for MacOS at the bottom is something I have to do. For instance, in the manual linking guidelines it says to add a line for AsyncStorage in your podfile, and when I just did npm i... and pod install, there was no line added to my podfile. Do I have to do this manual linking?


Solution

  • You don't have to do the manual linking. Since the 0.60 version of React Native, it was released a feature called autolinking. That is, when you execute the npm install or yarn add the lib is linked already, the pod install is just to install dependencies behind the scenes, it does not have to be necessarily in the podfile.