Linked Questions

53 votes
4 answers
181k views

Download & Install Xcode version without Premium Developer Account [duplicate]

I do not have Apple Developer Premium Account and I need Xcode Beta (recent major release of Application Development tool by Apple). How can I download Xcode (beta) version without Premium Apple ...
Wasim K. Memon's user avatar
45 votes
6 answers
17k views

How can I programmatically find Swift's version?

I know I can find the version of Swift I'm running right now reverting to a Terminal and typing: xcrun swift --version Swift version 1.1 (swift-600.0.57.4) Target: x86_64-apple-darwin13.4.0 Also, I'...
Diego Freniche's user avatar
40 votes
2 answers
26k views

What versions of Swift are supported by what versions of Xcode?

I develop apps in Swift for a living. I enjoy the language and follow it as closely as I can. Yet, still, certain facts slip through, whether by me being blindsided, or by Apple being very quiet about ...
Ky -'s user avatar
  • 31.5k
17 votes
2 answers
25k views

How to change Swift version from 5 to 4 in Xcode?

I am programming with Swift in Xcode (MacBook Air 2015) and I want to change my Swift version from 5 to 4. How to do that?
surftijmen's user avatar
16 votes
3 answers
8k views

How to check, swift version for Playground?

I was just testing my code in play ground(xcode-8.2), using swift tutorial. I came across following sample code: One-Sided Ranges for name in names[2...] { print(name) } now my play ground ...
Gaurang Chokhariya's user avatar
11 votes
1 answer
6k views

What is the "Swift Language Version" Xcode setting for? Because it still builds newer Swift code with an older version set

I'm building source code using an Xcode project that has its "Swift Language Version" set to "Swift 4." Even with this set, the project builds Swift 5.1 source code like, for example, implicit returns ...
Ilias Karim's user avatar
  • 5,048
3 votes
3 answers
1k views

How to Write a Conditional for Different Versions of Xcode

I am working on an app from two different computers. One is my home machine, which is an older MacBook Pro, but has the latest OS and is running Xcode 7.3. The second machine I use is my work ...
zeeple's user avatar
  • 5,589
3 votes
2 answers
2k views

Spacing in parameter name on swift functions

I want to add a space between parameter names of a swift function. I want to achieve something like in the prepare for segue function provided by swift func prepare(for segue: UIStoryboardSegue, ...
Vicentiu Petreaca's user avatar
2 votes
3 answers
691 views

Only run code if on a certain version of Xcode

I'm making a library that uses the variants variable of AVAsset. That's less important; the significant part is that it has an Xcode 13+ requirement. This library may be used by apps running Xcode 12. ...
Hackerman's user avatar
  • 1,308
0 votes
1 answer
897 views

Is xcode 8.3.3 running swift 3.2

With Xcode 9 and swift 4 out, I keep seeing that you have to migrate from swift 3.2. Currently I am running Xcode 8.3.3 which shows my swift compile language as swift 3. Some places have said swift ...
Berro's user avatar
  • 15
2 votes
1 answer
824 views

Change Type in Swift

I'm brand new to Swift (quarantine learning) and was following along a YouTube video to create a total price app. I'm having trouble changing a string to a double type, basically taking the input and ...
Jacob3454's user avatar
  • 175
2 votes
0 answers
598 views

How to set the swift compiler version?

I am new at developing with Swift so I guess I am missing something... I have an iOS app built in Swift 3, which is no longer supported in xCode. So I guess I need to migrate to a newer version of ...
Wim's user avatar
  • 398
0 votes
1 answer
148 views

Error to use a shorter spelling to unwrap a value

in Swift documentation at https://docs.swift.org/swift-book/GuidedTour/GuidedTour.html, there are examples about usage of optionals and unwrapping them. When I try the examples on my Macbook, I got an ...
Oguzhan Bolukbas's user avatar
0 votes
0 answers
33 views

Running Swift regex example gives many errors [duplicate]

I never worked with Swift, but now I need to understand how its regex works. So, from this site I took the following example: import Foundation let regex = /(\w+)\s+(\d+)/ let input = "Tom 123 ...
Pavel_K's user avatar
  • 11.5k