<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 &quot;xcrun swift&quot; to get swift version. I did that by &#39;<span style="font-family:Menlo;font-size:11px">export TOOLCHAINS=com.apple.dt.toolchain.Swift_2_3&#39;.</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:&quot;${PATH}&quot;</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">&lt;<a href="mailto:k@keith.so" target="_blank">k@keith.so</a>&gt;</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 &quot;com.apple.dt.toolchain.Swift_<wbr>2_3&quot; 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>
&gt; There are two toolchains under Xcode-beta.app/Contents/<br>
&gt; Developer/Toolchains/.<br>
&gt;<br>
&gt; &gt; Swift_2.3.xctoolchain/<br>
&gt; &gt; XcodeDefault.xctoolchain/<br>
&gt;<br>
&gt;<br>
&gt; So in a terminal. input<br>
&gt;<br>
&gt; &gt; export PATH=/Applications/Xcode-beta.<wbr>app/Contents/Developer/<br>
&gt; &gt; Toolchains/Swift_2.3.<wbr>xctoolchain/usr/bin:&quot;${PATH}&quot;<br>
&gt;<br>
&gt;<br>
&gt; After I did that, when I input swift, it would be 2.3, but when I type<br>
&gt; xcrun swift, it was still 3.0 or 2.2.<br>
&gt;<br>
&gt; Any idea?​<br>
&gt;<br>
&gt; Zhaoxin​<br>
&gt; ​<br>
&gt;<br>
&gt;<br>
&gt; On Thu, Aug 11, 2016 at 12:44 PM, Zhao Xin &lt;<a href="mailto:owenzx@gmail.com">owenzx@gmail.com</a>&gt; wrote:<br>
&gt;<br>
&gt; &gt; I try to change command line tool from Xcode 8.0(8S193k) to Xcode<br>
&gt; &gt; 7.3.1(7D1014), who lead me to swift 3.0 or swift 2.2. I need Swift 2.3 to<br>
&gt; &gt; build Realm Cocoa from its source.<br>
&gt; &gt;<br>
&gt; &gt; Any idea?<br>
&gt; &gt;<br>
&gt; &gt; Zhaoxin<br>
&gt; &gt;<br>
<br>
</div></div>&gt; ______________________________<wbr>_________________<br>
&gt; swift-users mailing list<br>
&gt; <a href="mailto:swift-users@swift.org">swift-users@swift.org</a><br>
&gt; <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>