Skip to content

Instantly share code, notes, and snippets.

@tanner0101
Created January 31, 2018 01:42
Show Gist options
  • Save tanner0101/cdb77c7f58d53af2ba2da5d39415389a to your computer and use it in GitHub Desktop.
Save tanner0101/cdb77c7f58d53af2ba2da5d39415389a to your computer and use it in GitHub Desktop.
Swift 4.1 on macOS
  1. Download latest "Swift 4.1 Development" snapshot from Swift.org Snapshots.
  2. Open downloaded .pkg file to install.
  3. Xcode > Toolchains > Swift 4.1 Snapshot
@tanner0101
Copy link
Author

screen shot 2018-01-30 at 8 41 56 pm
screen shot 2018-01-30 at 8 42 02 pm

@jkmathew
Copy link

jkmathew commented Feb 1, 2018

We can do this in for terminal like

johny-imac:~ johnykutty$ swift --version
Apple Swift version 4.0 (swiftlang-900.0.65 clang-900.0.37)
Target: x86_64-apple-macosx10.9
johny-imac:~ johnykutty$ ls /Library/Developer/Toolchains
swift-3.0-PREVIEW-6.xctoolchain				swift-4.1-DEVELOPMENT-SNAPSHOT-2018-01-30-a.xctoolchain	swift-latest.xctoolchain
johny-imac:~ johnykutty$ /usr/libexec/PlistBuddy -c "Print CFBundleIdentifier:" /Library/Developer/Toolchains/swift-4.1-DEVELOPMENT-SNAPSHOT-2018-01-30-a.xctoolchain/Info.plist
org.swift.4120180130a
johny-imac:~ johnykutty$  export TOOLCHAINS=org.swift.4120180130a
johny-imac:~ johnykutty$ swift --version
Apple Swift version 4.1-dev (LLVM 4d75b446be, Clang db92199adc, Swift 990b05adc6)
Target: x86_64-apple-darwin16.7.0
johny-imac:~ johnykutty$ 

@twof
Copy link

twof commented Feb 10, 2018

Be sure you select "Install for all users" when you install, or else the toolchain won't be placed in the directory above

@0xTim
Copy link

0xTim commented Feb 22, 2018

There is a snapshot in the Vapor APT for Linux:
sudo apt-get install swift-beta

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment