I need to use CocoaPods for a specific library. However I don\'t want to use it for any other because it usually forces me to add React and its dependencies to the Podfile as we
The solution that I use is really a workaround. It is not great but it works for me. Ideally it would be nice if react-native link
offered a -noPods
flag but it doesn't.
react-native link
checks to see if there is a Podfile
, if there is no Podfile
it links the dependency as normal.
So what I do is the following:
yarn
or npm
. Podfile
.react-native link dependency_name
Podfile
(effectively undeleting it)Alternatively you rename the Podfile
to something else, and then rename it back after you have linked.