Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.2k views
in Technique[技术] by (71.8m points)

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

question from:https://stackoverflow.com/questions/65952769/react-native-do-you-have-to-do-manual-linking-for-asyncstorage

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...