DEV Community

Discussion on: Why and How to Start Using Xcode to Build Your React Native iOS Apps ASAP

Collapse
 
sakko profile image
SaKKo

Hi, just a suggestion.
Since cocoapods is coded by ruby, there maybe time in the future that you might need to update your ruby version and this gem may break. Also, i'm not a big fan fo sudo gem install _____. it's root and most of the time it's not necessary.

I would suggest you to install rvm first, follow this url.
github.com/rvm/rvm

Once rvm is installed, restart terminal then install ruby (latest now is 2.7.2)
rvm install 2.7.2
NOTE: you can install other versions as well.

You can now swap to use this ruby version using
rvm use 2.7.2
to set this version as default run
rvm use 2.7.2 --default

Once your are on 2.7.2 (try checking with ruby -v) you can now run
gem install cocoapods

ps1: you don't need root permission to install cocoapods.
ps2: rvm will also install homebrew for you. you might find it useful later.

Collapse
 
analyticsinstitute profile image
Anna

Thank you! I'll check it out