Is it possible to compile Swift 4 on Xcode 8.x?

I wonder if there is a way to start the game around Swift 4 without having to install the beta version of Xcode 9, is this possible?

+5
source share
3 answers

I realized that Yes is possible. You can achieve this by setting the last snapshot:

Development snapshots are pre-created binaries that are automatically created from the main development branches.

https://swift.org/download/#snapshots

A snapshot is a toolchain that you can install in Xcode, which contains the latest compiler (Swift 4 in your case), which allows you to build an application on the latest tools.


How to customize snapshot in Xcode?

1- Download the latest snapshot (Xcode) from the Swift website .

2- Install the downloaded .pkg snapshot file.

3- Launch Xcode, and then follow the link: Xcode → Toolchains → Toolchain Management.

4- After selecting the options "Components" - "Toolchains" you should see:

enter image description here

Select "Swift Developer Snapshot" and it will be!

You may need to reset Xcode after completing the above steps.

Reminder: you must re-select the "Xcode 8.3.3" option after completing the game around Swift 4, as indicated in the Swift - Using Downloads section:

To ship to the App Store, you must create your application using the version of Swift that is included with Xcode.

+8
source

If all you want to do is play with Swift 4, you can also use the IBM Swift Sandbox , which always has the most recent snapshot.

+2
source

Although this is not directly from Xcode, you can also use Iswift , which should have the fastest version (last snapshot).

+1
source

Source: https://habr.com/ru/post/1269442/


All Articles