Using PODS to manage third-party libraries in OC It's easy to use pod to manage third-party libraries in Swift today
In fact, it is very simple and OC difference is not very small below to say I encountered some problems and solutions
Of course use pod you need to install Pod installation pod First, you must first install Rudy
No more talking about installing pods and installing Rudy the next article will cover
Here are the prerequisites for installing Pod and Rudy.
1. First build a new project of course this project is Swift's language
2. Open your terminal CD to your project directory, enter POD init, and you'll see a podfile file in your project directory.
3. Double-click Open Podfile file in the selected target to enter the library you want to use such as pod ' Alamofire ' close save
4. Go back to your terminal CD and enter the pod install directly into your project directory to wait a little while
5. If there is no unexpected completion you will find that in your project pod has generated a project file for you to open it in Viewcontroller.swift input import Alamofire Compile if there is no error, then this is over. Congratulations on your completion The use of pods in swift
Then you can use some of the third-party libraries you added in your project. Isn't it convenient?
If a question mark appears behind some files after you have performed the pod install? You can add to your project directly under source Control and the question mark disappears.
Swift uses pod management