{"metadata":{"image":[],"title":"","description":""},"api":{"url":"","auth":"required","settings":"","params":[],"results":{"codes":[]}},"next":{"description":"","pages":[]},"title":"Install Swift 3: macOS","type":"basic","slug":"install-on-mac-os","excerpt":"","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]","updates":["57372f0864ad2b1700457196"],"order":0,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"_id":"5768701b72cd4c0e000fad29","project":"57086fe855a4690e005de407","createdAt":"2016-04-09T04:14:50.604Z","category":{"sync":{"isSync":false,"url":""},"pages":[],"title":"Getting Started","slug":"documentation","order":0,"from_sync":false,"reference":false,"_id":"5768701b72cd4c0e000fad19","createdAt":"2016-04-09T02:58:48.377Z","__v":0,"project":"57086fe855a4690e005de407","version":"5768701b72cd4c0e000fad18"},"version":{"version":"0.12","version_clean":"0.12.0","codename":"Client Clyde","is_stable":false,"is_beta":true,"is_hidden":false,"is_deprecated":true,"categories":["5768701b72cd4c0e000fad19","5768701b72cd4c0e000fad1a","5768701b72cd4c0e000fad1b","5768701b72cd4c0e000fad1c"],"_id":"5768701b72cd4c0e000fad18","releaseDate":"2016-06-20T22:37:15.641Z","__v":1,"createdAt":"2016-06-20T22:37:15.641Z","project":"57086fe855a4690e005de407"},"user":"57086f3d447c410e00221bd1","githubsync":"","parentDoc":null,"__v":8}

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]