{"_id":"5768701b72cd4c0e000fad29","project":"57086fe855a4690e005de407","type":"basic","api":{"settings":"","url":"","auth":"required","params":[],"results":{"codes":[]}},"createdAt":"2016-04-09T04:14:50.604Z","isReference":false,"order":0,"body":"To install Vapor, you just need to have Swift 3 installed.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Download\"\n}\n[/block]\nIf you have Xcode, you'll already have Swift 2 installed. But you'll need to download Swift 3 to use Vapor.\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Swift Version Manager\",\n  \"body\": \"If you work on multiple Swift 3 projects, you may want to follow \\\"Install Swift 3 (Swiftenv)\\\" instead.\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"# Download\\ncurl -O https://swift.org/builds/development/xcode/swift-DEVELOPMENT-SNAPSHOT-2016-06-20-a/swift-DEVELOPMENT-SNAPSHOT-2016-06-20-a-osx.pkg\\n\\n# Install\\nopen swift-DEVELOPMENT-SNAPSHOT-2016-06-20-a-osx.pkg\",\n      \"language\": \"shell\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Install\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"# Add to path\\necho \\\"export PATH=/Library/Developer/Toolchains/swift-latest.xctoolchain/usr/bin:\\\\\\\"\\\\${PATH}\\\\\\\"\\\" >> ~/.bash_profile\\n\\n# Reload path\\nsource ~/.bash_profile\",\n      \"language\": \"shell\"\n    }\n  ]\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"title\": \"Xcode 8\",\n  \"body\": \"You must have Xcode 8 installed and **selected**.\"\n}\n[/block]\nDownload and open the Xcode 8 beta, then run the following code:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"sudo xcode-select -s /Applications/Xcode-beta.app/\",\n      \"language\": \"shell\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Verify\"\n}\n[/block]\nCheck whether your installation worked. The output should contain `3.0-dev`.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"swift --version\\n\\n# Apple Swift version 3.0-dev (LLVM b010debd0e, Clang 3e4d01d89b, Swift 7182c58cb2)\",\n      \"language\": \"shell\"\n    }\n  ]\n}\n[/block]","category":"5768701b72cd4c0e000fad19","updates":["57372f0864ad2b1700457196"],"version":"5768701b72cd4c0e000fad18","user":"57086f3d447c410e00221bd1","githubsync":"","hidden":false,"link_external":false,"sync_unique":"","parentDoc":null,"slug":"install-on-mac-os","title":"Install Swift 3: macOS","__v":8,"excerpt":"","link_url":"","metadata":{"title":"","description":"","image":[]},"childrenPages":[]}

Install Swift 3: macOS


To install Vapor, you just need to have Swift 3 installed. [block:api-header] { "type": "basic", "title": "Download" } [/block] If you have Xcode, you'll already have Swift 2 installed. But you'll need to download Swift 3 to use Vapor. [block:callout] { "type": "info", "title": "Swift Version Manager", "body": "If you work on multiple Swift 3 projects, you may want to follow \"Install Swift 3 (Swiftenv)\" instead." } [/block] [block:code] { "codes": [ { "code": "# Download\ncurl -O https://swift.org/builds/development/xcode/swift-DEVELOPMENT-SNAPSHOT-2016-06-20-a/swift-DEVELOPMENT-SNAPSHOT-2016-06-20-a-osx.pkg\n\n# Install\nopen swift-DEVELOPMENT-SNAPSHOT-2016-06-20-a-osx.pkg", "language": "shell" } ] } [/block] [block:api-header] { "type": "basic", "title": "Install" } [/block] [block:code] { "codes": [ { "code": "# Add to path\necho \"export PATH=/Library/Developer/Toolchains/swift-latest.xctoolchain/usr/bin:\\\"\\${PATH}\\\"\" >> ~/.bash_profile\n\n# Reload path\nsource ~/.bash_profile", "language": "shell" } ] } [/block] [block:callout] { "type": "warning", "title": "Xcode 8", "body": "You must have Xcode 8 installed and **selected**." } [/block] Download and open the Xcode 8 beta, then run the following code: [block:code] { "codes": [ { "code": "sudo xcode-select -s /Applications/Xcode-beta.app/", "language": "shell" } ] } [/block] [block:api-header] { "type": "basic", "title": "Verify" } [/block] Check whether your installation worked. The output should contain `3.0-dev`. [block:code] { "codes": [ { "code": "swift --version\n\n# Apple Swift version 3.0-dev (LLVM b010debd0e, Clang 3e4d01d89b, Swift 7182c58cb2)", "language": "shell" } ] } [/block]