I'm using React Native 0.61, and have been reading about the new auto-linking feature. If you have any insight on ANY of the following questions, I'd appreciate it.
My Questions Are:
1) My understanding of react-native link <module>
is that it adds a line for <module>
to your Podfile, and then you run pod install
. However, for the last year I've been using react-native link
and linking manually, and have never run pod install
. So am I right that react-native link
does more than just add lines to your Podfile?
2) In the past, when react-native link
failed to link the module, I manually linked it by dragging the .xcodeproj
and .a
files into Xcode as described here. Does react-native link
(when it works) add the line to your Podfile AND add .xcodeproj
and .a
files into Xcode for you?
3) Is there anything involved in native modules being linked other than the .xcodeproj
and .a
files being added to Xcode?
4) What exactly does pod install
do? Does it take all the native modules referenced in your Podfile and add .xcodeproj
and .a
files into Xcode? If so, that would involve two steps: adding the line to your Podfile and then running pod install
. Why not just react-native link
?
5) My understanding of auto-linking is that it adds lines for all native modules to your Podfile, and then you still have to run pod install
. Isn't this just accomplishing the same thing as react-native link
?
6) In this guide to auto-linking, it says "Autolinking is a replacement for react-native link. If you have been using React Native before version 0.60, please unlink native dependencies if you have any from a previous install.". Why does it tell you to unlink? If the module is already linked, what will unlinking it and re-linking it do? This implies there's a difference between the way modules are linked with react-native link
and via auto-linking. What happens if you auto-link and then pod install
, and then try using react-native link
, or vice versa?
7) I outlined this in the previous questions, but just to make it concise, what is the difference between auto-linking + pod install
and react-native link
?