xcrun swift -versionīecause I'm using Xcode 14, the output of the above command shows that Xcode 14 ships with Swift 5.7. Let's use the command line to find out what Swift version Xcode ships with. The problem is that Xcode only shows the major version or, in the case of Swift 4.2, the major and the minor version. You can switch to a different version of the Swift language using the dropdown menu. I'm using Xcode 14 so the Swift version for a new project is Swift 5. One of the build settings of the target is named Swift Language Version. Click the project in the Project Navigator and inspect the build settings of the target by selecting the Build Settings tab at the top.Įnter Swift in the search field in the top right. To figure out which version of Swift the project uses, we take a look at the build settings of the target. Using Xcodeįire up Xcode and create a project using the App template from the iOS > Application section.Ĭonfigure the project and tell Xcode where you would like to save the project files on your machine. This episode of Swift Fundamentals sheds some light on this seemingly simple question. Have you ever wondered what version of Swift you are using in the project you're working on? The answer is less straightforward that you might think. Plus, our 24/7 support ensures you're never alone. With simple pricing and flexible configurations, you can get up and Our platform provides secure cloud infrastructure for developers. Get reliable and affordable cloud hosting with DigitalOcean!
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |