<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi Alex,<div class=""><br class=""></div><div class="">Since you mentioned you have Xcode 7.2.1 installed I presume you’ll want to have this setup on OS X.</div><div class=""><br class=""></div><div class="">Up until Xcode 7.3 Swift has always been bundled with Xcode (as it was not open sourced yet).</div><div class=""><br class=""></div><div class=""><a href="https://swift.org/download/#apple-platforms" class="">https://swift.org/download/#apple-platforms</a> is the place to look for snapshots from 2.2 onwards.</div><div class="">Here you will find snapshots both for the release branch of 2.2 and development which will contain features intended for 3.0, but not included in 2.2.</div><div class=""><br class=""></div><div class="">You can install multiple of these, and in Xcode 7.3 you get an overview of the versions installed (you can also find them in /Library/Developer/Toolchains) and switch between these easily.</div><div class=""><br class=""></div><div class="">On the command line you can use xcrun to choose which toolchain you want to use:</div><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(219, 217, 210); background-color: rgb(59, 59, 59);" class="">16-02-15 6:48:03 <span style="font-variant-ligatures: no-common-ligatures; color: #bde9be" class=""><b class="">➜ </b></span><span style="font-variant-ligatures: no-common-ligatures; color: #8decee" class=""><b class="">~ </b></span><span style="font-variant-ligatures: no-common-ligatures; color: #9bcefb" class=""><b class=""> </b></span>xcrun --toolchain org.swift.2220160208a swift build</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(219, 217, 210); background-color: rgb(59, 59, 59);" class="">error: unable to invoke subcommand: /Library/Developer/Toolchains/swift-2.2-SNAPSHOT-2016-02-08-a.xctoolchain/usr/bin/swift-build (No such file or directory)</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(219, 217, 210); background-color: rgb(59, 59, 59);" class="">16-02-15 6:48:26 <span style="font-variant-ligatures: no-common-ligatures; color: #ffadac" class=""><b class="">➜0 </b></span><span style="font-variant-ligatures: no-common-ligatures; color: #bde9be" class=""><b class=""> </b></span><span style="font-variant-ligatures: no-common-ligatures; color: #8decee" class=""><b class="">~ </b></span><span style="font-variant-ligatures: no-common-ligatures; color: #9bcefb" class=""><b class=""> </b></span>xcrun --toolchain org.swift.3020160208a swift build</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(219, 217, 210); background-color: rgb(59, 59, 59);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #ffadac" class="">error:</span> no Package.swift file found</div><div class=""><br class=""></div><div class="">Notice that you need to use the toolchain’s bundle identifier (check the Info.plist) to identify the toolchain precisely.</div><div class=""><br class=""></div><div class="">For Swift 2.1 you’ll need to use Xcode 7.2 and use xcode-select if you want to use that on the command line, as well as for switching back to 7.3.</div><div class=""><br class=""></div><div class="">I hope this helps,</div><div class=""><br class=""></div><div class="">Seán</div><div class=""><br class=""></div><div class=""><blockquote type="cite" class=""><div class="">On 13 Feb 2016, at 23:05, alex via swift-users <<a href="mailto:swift-users@swift.org" class="">swift-users@swift.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html; charset=utf-8" class=""><div dir="ltr" class="">Hi,<div class=""><br class=""></div><div class="">I’m a Swift newbie, going through the Swift books (2.1 and 2.2). I’m a bit confused and I’d appreciate your help with setting up a good environment.</div><div class=""><br class=""></div><div class="">1. I have Xcode 7.2.1 installed. This seems to correspond to Swift 2.1.1 which I assume is the stable version.</div><div class=""><br class=""></div><div class="">2. There are release snapshots for 2.2 available on <a href="http://swift.org/" class="">swift.org</a>.</div><div class=""><br class=""></div><div class="">Q2.1: can one run in parallel Swift 2.1.1 and 2.2 snapshots? If yes, what setup do I need?</div><div class=""><br class=""></div><div class="">Q2.2: I read that 2.2 snapshots do not include the Package manager. Can it be installed separately?</div><div class=""><br class=""></div><div class="">3. I’ve heard about the upcoming big 3.0 Swift version.</div><div class=""><br class=""></div><div class="">Q3.1: are there development snapshots available?</div><div class=""><br class=""></div><div class="">Q3.2: as above, can one run 2.1, 2.2, and 3.0 snapshots in parallel on the same system? (if yes, please do include any links on how the setup looks like)</div><div class=""><br class=""></div><div class="">thanks a lot for your help,</div><div class=""><br class=""></div><div class="">:- a</div></div>
_______________________________________________<br class="">swift-users mailing list<br class=""><a href="mailto:swift-users@swift.org" class="">swift-users@swift.org</a><br class=""><a href="https://lists.swift.org/mailman/listinfo/swift-users" class="">https://lists.swift.org/mailman/listinfo/swift-users</a><br class=""></div></blockquote></div><br class=""></div></body></html>