First install Cocoapods
Then open TERMINAL,CD into the folder with the. Xcodeproj.
Enter POD Init
You will create a pod file here
Enter the folder, open pod file (preferably with Xcode), and do the following steps
1. Uncomment Platform:ios, ' 9.0 '
2. Pod ' Alamofire ', ' ~> 3.2.1 ' (if not specified version, will default more than 4.0 version, the build may report many errors)
3. If you have multiple target, add 2 to each target
Then return to terminal, enter pod install or pod install--verbose--no-repo-update
Wait for the update to be good. Close project in Xcode, and open the. xcworkspace file from the Finder. This will be the entrance for the future.
This time you can build it first. If not, select project (main project), and then search for legacy in build setting
Change the legacy coverage to Yes. One more time, there should be no mistakes.