What I learned about today:
1. Cocoapods Installation and use
1.1>. Cocoapods is the most commonly used third-party library management tool in iOS, and most of the well-known open source libraries support cocoapods. Because it is implemented using Ruby, we first need to configure the Ruby environment ourselves.
1.1.1>> How to install the Ruby environment in your Mac.
Rvm:ruby Version Manager
Gem: A standard package for managing Ruby libraries and programs, finding, installing, upgrading, and uninstalling packages through Ruby gem sources. {
Frequently used commands:
#更新Gem自身
Gem Update--system
#从Gem源安装gem包
Gem Install
#更新所有已安装的gem包
Gem Update
#查看本机已安装的所有gem包
Gem List
At this point, the ruby environment is installed.
1.2>. Download and install Cocoapods
It's pretty simple, just a command line: sudo gem install cocoapods. Maybe you will appear to let you enter the password this part, then you have to pay attention to, after I search the internet for half a day results, here, you need to enter your permission password (not the Apple ID), Although you cannot see it when you enter the password. But the input is correct and it goes down.
Like this.
The above link inside the picture does not appear, can see this <--.
1.3>. How to use Cocoapods
Link inside also has, this inside encountered several questions:
(1) Enter the directory where your project is located by the terminal (CD command).
How to get in? Like this.
After creating the podfile, how do I enter the contents of the response? Use the OPEN-E podfile command line.
Scene one I tried, succeed. Scene two himself downloaded a MJ-like source from GitHub (this is the source address). This project is using the Cocoapodsdemo class library, but it did not succeed when using the pod update or pod install command line. Post the error diagram and analyze it later.
}
iOS learning the next day's essays