Unlimited Plugins, WordPress themes, videos & courses! Unlimited asset downloads! From $16.50/m
Outdated Course
This course uses Swift 2, which is now outdated. We've built a complete guide to help you learn Swift, whether you're just getting started with the basics or you want to explore more advanced topics: Learn Swift.

Next lesson playing in 5 seconds

Cancel

Free Preview: Up and Running With Swift 2

Introduction

01:13
  • Overview
  • Transcript

Swift is a new programming language from Apple, designed specifically for creating iOS, OS X and watchOS apps. The designers of Swift drew from the best of the new generation of languages, while also building on the success of C and Objective-C. Swift has a powerful type system for safe programming and adds many features to make the lives of programmers easier. Even though it's barely a year old, Swift is already popular with programmers for its flexibility and expressiveness.

In this course, Tuts+ instructor Derek Jensen will start from the foundations to give you a thorough understanding of the Swift language. The course will introduce Swift's types, control flow and object-orientation syntax, with a special emphasis on the features that make Swift unique. This course will also highlight some of the great new features that have come to Swift in version 2.

We've built a complete guide to help you learn Swift, whether you're just getting started with the basics or you want to explore more advanced topics: Learn Swift.

1. Introduction

1.1 Introduction

Hello my name is Derek Jensen and I wanna welcome you to Up and Running With Swift 2 brought to you by your friends here at Tuts+. Now even though Swift is a very young language it has really been picking up steam in the developer community because of its flexibility and its adoption of modern programming language features. Not to mention Apple is really investing heavily in its development as their flagship programming language of the future. Now recently, at their worldwide developer conference, Apple announced a ton of new features being added to the language. Now some of these features include a brand new error handling model, enhancements to pattern matching, protocol extensions, availability checking and a whole slew of others. Now I could simply throw together a course just highlighting these features, but I would be doing a disservice. So we're going to move back to the beginning and re-acquaint ourselves with this blossoming language and introduce these new features in context to really help drive home their usefulness in your mind so that you have a better chance of not only remembering them, but also putting them to good use. So let's not waste any time. Let's get started.

1.2 Prerequisites

As usual, before we start diving in to any sort of topics that are specific to Swift or Swift 2.0 or anything on the Apple platform. Like usual, we need to make sure we have all of the pre-requisites. And lucky for us, typically, that only means we need an IDE and then IDE as Xcode. Now, in order to use Swift 2.0 and a lot of the new features to target a lot of the new platforms and STKs, you're gonna need the latest version of Xcode. And the latest version of Xcode is Xcode 7, which was actually fully released at the time of this recording about a couple days ago on September 16th. So if you have a previous version of Xcode 7, one of the beta releases or maybe the GM seed, then you're gonna probably wanna get rid of that and start from scratch and install the actual full release version. Just so that we've at least gotten rid of all of these kind of bugs and things that have come up previously. Now that's not to say that we're not gonna run into any issues, or you're not gonna run into any issues when you're using the new version of Xcode in Swift 2.0. Because as usual, as I've mentioned in previous Swift courses, Swift is still evolving. It's a very young language, and we're still seeing a lot of modifications and updates and changes as we go along. Some of them are very simple things and are non-breaking, but some of them are breaking changes. And that's just the way that it goes when you start to adopt a new language, at least in its early stages like this. So don't be really afraid of that, it's gonna happen, so just kind of be prepared for that. But we are going to need Xcode 7. So if you do have it, then you should be ready to go. If you don't, once again, the nice thing about this is that it's a free download and that you can head over to the App store and simply search for Xcode. And you will be taken to this page where you can either click on the get button if you don't have it yet, or the update button if you maybe have a previous version of say Xcode 6. Then you can just go ahead and do an update. But once you've actually gone through that process, then you are ready to start doing Swift 2.0 development. So all we really have to do is open up Xcode and you're going to see here, that we have version 7.0 ready to go. And from this point you are ready to start building your applications. So in the next lesson, we're gonna cover a couple of the basic ways that we are going to be able to use Swift and how we're going to be able to use it when it comes to Xcode. So there's about three main options that you have that you can pretty much use to follow along in this course. But I'm going to suggest that we use one in particular just because it's easier and it provides the most rich set of functionality and tools. And probably the most reliable at this point. So let's go ahead and see what those options are.