xxxxxxxxxx
`bundle install` prior to `pod install` works.
Explaination:
To answer `bundle Install`, what happens is, when generating react native
project the configuration is set to default mac gem version. If you have
updated gem version on your mac the project configuration could not pick
the correct gem version. thats why it throws the can't find
gem cocoapods.
by doing `bundle install`, It will update the project config according to
the mac gem version.
xxxxxxxxxx
sudo gem uninstall cocoapods
sudo gem install -n /usr/local/bin
cocoapods pod install