Use of Cocoapods
About Cocoapods, I believe that the development of iOS should be more familiar with. Cocoapods is an easy-to-use management tool for managing third-party libraries. The thing about Cocoapods no longer said, and then came to the chase.
My software version is as follows:
Xcode version is 7.3.1
Cocoapods version is 1.0
Manage with a terminal
The command to query the library is the same as before
$ pod Search name of the library to query
Only after the query is completed cannot be entered directly, you can press the Q key to exit the search page. Note, however, that the search results are gone after exiting, so find a place to save the pod commands you want to use.
Then, about the section created by Podfile. The official website now has an intelligently created command, and the usage is not much worse than the previous one. It is also necessary to switch the CD to the project directory first, and then enter the following command:
$ pod Init
You can see the familiar podfile files appearing in the project folder.
Then open the inside style as follows:
Platform:ios, ' 8.0 ' use_frameworks!target ' project name ' do pod ' afnetworking ', ' ~> 2.6 ' pod ' orstackview ', ' ~> 3.0 ' pod ' Swiftyjson ', ' ~> 2.3 ' end
It's an official example of stealing some slack here.
Then you can start installing the ~ command unchanged:
$ pod Install
After the installation is complete, you can use the following command to open the project:
Open your project name. Xcworkspace
Attention:使用这个命令打开前必须要关闭.xcodeproj工程文件
Third-party libraries can then be used normally.
[iOS development] about the use of cocoapods