1. View the current environment
: ~ user$ eval "$ (curl-sl check.vapor.sh)"
Normal situation
? Xcode 9 is compatible with Vapor 2.
? Xcode 9 is compatible with Vapor 3.
? Swift 4.1 is compatible with Vapor 2.
? Swift 4.1 is compatible with Vapor 3.
The situation encountered
? Xcode 9 is compatible with Vapor 2.
? Xcode 9 is compatible with Vapor 3.
2018-06-08 10:54:13.808 xcodebuild[91618:4860941] [MT] pluginloading:required plug-in compatibility UUID 426A087B-D3AA-431A-AFDF-F135EC00DE1C for plug-in at path ' ~/library/application support/developer/shared/xcode/ Plug-ins/xalign.xcplugin ' not present in Dvtplugincompatibilityuuids
2018-06-08 10:54:13.809 xcodebuild[91618:4860941] [MT] pluginloading:required plug-in compatibility UUID 426A087B-D3AA-431A-AFDF-F135EC00DE1C for plug-in at path ' ~/library/application support/developer/shared/xcode/ Plug-ins/vvdocumenter-xcode.xcplugin ' not present in Dvtplugincompatibilityuuids
? Swift 4.1 is compatible with Vapor 2.
? Swift 4.1 is compatible with Vapor 3.
Here because the Xcode upgrade caused by the plug-in failure, the specific which temporarily did not pay attention to, only to find the method of correction
: ~ user$ Find ~/library/application\ support/developer/shared/xcode/plug-ins/-name info.plist-maxdepth 3|xargs-i{} Defaults write {} Dvtplugincompatibilityuuids-array-add UUID
Enter this command to inject the UUID into the info.plist of the plugin, and then follow the above process query is normal.
2. Download Vapor
: ~ user$ Brew Install Vapor/tap/vapor
The command may update brew first and may have errors in the middle, specifically analyzing
3. After you have finished, switch to the folder where you want to create the project, and then typing the following command
: The folder you created user$ vapor new Hellovapor--api--branch=beta
It will then begin to create the process, which will take a while, and print the following pattern when it is created successfully
Cloning Template [done]
Updating package Name [done]
Initializing git repository [done]
**
**~~**
**~~~~~~**
**~~~~~~~~~~**
**~~~~~~~~~~~~~~**
**~~~~~~~~~~~~~~~~~~**
**~~~~~~~~~~~~~~~~~~~~~~**
**~~~~~~~~~~~~~~~~~~~~~~~~**
**~~~~~~~~~~~~~~~~~~~~~~~~~~**
**~~~~~~~~~~~~~~~~~~~~~~~~~~~~**
**~~~~~~~~~~~~~~~~~~~~~~~~~~~~**
**~~~~~~~~~~~~~~~~~~~~~++++~~~**
**~~~~~~~~~~~~~~~~~~~++++~~~**
***~~~~~~~~~~~~~~~++++~~~***
****~~~~~~~~~~++++~~****
*****~~~~~~~~~*****
*************
_ __ ___ ___ ___
\ \ / / /\ | |_) / / \ | |_)
\_\/ /_/--\ |_| \_\_/ |_| \
A web framework for Swift
Project "Hellovapor" has been created.
Type ' CD Hellovapor ' to enter the project directory.
Use the ' vapor cloud deploy ' to host your project for free!
enjoy!
4. Next link Xcode
: Hellovapor user$ Vapor Xcode
Print the following information
Generating Xcode Project [done]
Select the ' run ' scheme to run.
Open Xcode project?
Y/n> y
Opening Xcode Project ...
Manually select Y above, you will open the project with Xcode, when running as long as the current host port 8080 is not occupied, it can be run properly
Create a Hello Vapor background project on MacOS