Search code examples
iosreact-nativepodfile

Installing a react native package with Podfile


I'm following instructions here to add a package: https://github.com/joltup/rn-fetch-blob It says to do npm install OR add to Podfile. What I did was

yarn add rn-fetch-blob

Then 

cd ios
pod install

Is that correct? I didn't edit the Podfile but somehow it still knew to get the dependency. Output:

Analyzing dependencies
Downloading dependencies
Installing rn-fetch-blob (0.12.0)
Generating Pods project
Integrating client project

The Podfile doesn't have any reference to rn-fetch-blob. Can someone explain if I did it right or if I needed to edit the Podfile?


Solution

  • When you do pod install, it actually looks into your package.json dependancies to see what dependency requires pod installation. As you have already added it to node_modules but not in Podfile.