<div dir="ltr"><div class="gmail_default" style="font-family:georgia,serif">Thank you Keith. You helped me a lot. I finally got it work.</div><div class="gmail_default" style="font-family:georgia,serif"><br></div><div class="gmail_default" style="font-family:georgia,serif">As realm use "xcrun swift" to get swift version. I did that by '<span style="font-family:Menlo;font-size:11px">export TOOLCHAINS=com.apple.dt.toolchain.Swift_2_3'.</span></div><div class="gmail_default" style="font-family:georgia,serif"><span style="font-family:Menlo;font-size:11px"><br></span></div><div class="gmail_default" style="font-family:georgia,serif">I also think the document in <a href="https://swift.org/download/#using-downloads">https://swift.org/download/#using-downloads</a> should change </div><div class="gmail_default" style="font-family:georgia,serif"><br></div><div class="gmail_default"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><font face="georgia, serif">$ export PATH=/Library/Developer/Toolchains/swift-latest.xctoolchain/usr/bin:"${PATH}"</font></blockquote><div><br></div><div>to export TOOLCHAINS as well.</div><div><br></div><div>Zhaoxin</div><div style="font-family:georgia,serif"><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Aug 11, 2016 at 2:56 PM, Keith Smiley <span dir="ltr"><<a href="mailto:k@keith.so" target="_blank">k@keith.so</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">You can accomplish this with the `--toolchain` `xcrun` argument. It took a few<br>
tries but it seems as though this command works:<br>
<br>
```<br>
xcrun --toolchain "com.apple.dt.toolchain.Swift_<wbr>2_3" swiftc -v<br>
```<br>
<br>
I got this identifier from:<br>
<br>
/Applications/Xcode-beta.app/<wbr>Contents/Developer/Toolchains/<wbr>Swift_2.3.xctoolchain/<wbr>ToolchainInfo.plist<br>
<br>
--<br>
Keith Smiley<br>
<div><div class="h5"><br>
On 08/11, Zhao Xin via swift-users wrote:<br>
> There are two toolchains under Xcode-beta.app/Contents/<br>
> Developer/Toolchains/.<br>
><br>
> > Swift_2.3.xctoolchain/<br>
> > XcodeDefault.xctoolchain/<br>
><br>
><br>
> So in a terminal. input<br>
><br>
> > export PATH=/Applications/Xcode-beta.<wbr>app/Contents/Developer/<br>
> > Toolchains/Swift_2.3.<wbr>xctoolchain/usr/bin:"${PATH}"<br>
><br>
><br>
> After I did that, when I input swift, it would be 2.3, but when I type<br>
> xcrun swift, it was still 3.0 or 2.2.<br>
><br>
> Any idea?<br>
><br>
> Zhaoxin<br>
> <br>
><br>
><br>
> On Thu, Aug 11, 2016 at 12:44 PM, Zhao Xin <<a href="mailto:owenzx@gmail.com">owenzx@gmail.com</a>> wrote:<br>
><br>
> > I try to change command line tool from Xcode 8.0(8S193k) to Xcode<br>
> > 7.3.1(7D1014), who lead me to swift 3.0 or swift 2.2. I need Swift 2.3 to<br>
> > build Realm Cocoa from its source.<br>
> ><br>
> > Any idea?<br>
> ><br>
> > Zhaoxin<br>
> ><br>
<br>
</div></div>> ______________________________<wbr>_________________<br>
> swift-users mailing list<br>
> <a href="mailto:swift-users@swift.org">swift-users@swift.org</a><br>
> <a href="https://lists.swift.org/mailman/listinfo/swift-users" rel="noreferrer" target="_blank">https://lists.swift.org/<wbr>mailman/listinfo/swift-users</a><br>
<br>
</blockquote></div><br></div>