Record the development of Flutter to configure the IOS environment.
First install the XCode development tool, which will help you install the development package required for the Unix environment.
Then install Homebrew
Installing CocoaPods requires a Ruby environment, so first check the version of the Ruby environment!
first step:
The first thing to check is that your Mac has rvm installed. Open the terminal and enter the command rvm -v
If command not found is displayed. Indicates that it is not followed. Then proceed to the second step. If installed, skip to step 3 to start.
Step two:
terminal input
curl -L get.rvm.io | bash -s stable
***May prompt Failed to connect to raw.githubusercontent.com port 443: Connection refused
The network environment is not good, so find other ways by yourself. I'm skipping it here.
Picture after successful installation:
After installation, exit the terminal, and then enter rvm -v (the terminal does not exit, it always displays the state of the first step)
rvm -v
The picture of rvm -v after the second step of installation is successful :
third step:
List all ruby versions in the specified source
rvm list known
the fourth step:
install the latest
rvm install 3.0.0
Installed pictures
the fifth step:
Check the installed version
rvm list
Step six:
Check the ruby source
gem sources -l
If the ruby source is not this https://gems.ruby-china.com/
use:
6.1 Remove the ruby source
gem sources --remove https://rubygems.org/
6.2 Then add
gem sources --add https://gems.ruby-china.com
6.3
gem sources -l
gem sources -l Check again if it is https://gems.ruby-china.com/
Step seven:
安装cocoapods (CocoaPods Guides - Getting Started)
sudo gem install -n /usr/local/bin
or
sudo gem install cocoapods
Picture of successful installation: