I've been working with React Native for about a year, and have always linked native modules either with react-native link
or by manual linking, by dragging the .xcodeproj
file to the Libraries folder and then dragging the .a
file to the "Link Binary With Libraries" section of Build Phases. I'd heard of Cocoapods, and my project does include a Podfile (not sure where it came from), but it wasn't until recently that someone told me I HAD to use Cocoapods in order to link native modules, by doing cd ios
+ pod install
etc.
What I Want To Know:
What's the difference between linking native modules the way I've done it all along, and doing it via Cocoapods? What's the essence of Cocoapods and how does it fit into React Native development vs regular linking?