So you want to learn the programming language everyone’s talking about, but don’t know where to look? We’ll give you a few pointers to kick-start you on your way to becoming a great Swift developer!
It doesn’t matter whether you’re already an experienced Objective-C developer or completely new to iOS development, you’ll still run into trouble choosing the right learning resources. There are already a lot of them available for learning Swift. To save you time, we’re here to recommend a few good ones!
Why start with Swift?
If you’re just starting out with iOS development, you’re probably wondering whether to go with Objective-C and then move to Swift or skip Objective-C altogether.
Objective-C is 33 years old, and it served us well so far (and still does). On the other hand, Swift has been around for only 2 years, but it’s steadily gaining momentum. Without a doubt, Apple will keep supporting Objective-C for some time, as most of Apple’s apps are still written in it. Nevertheless, it’s clear Apple is putting its money on Swift. It’s the future of both iOS and macOS, and Swift 3 was just released with a lot of improvements!
Swift is a brand new programming language for iOS, macOS, watchOS and tvOS. It has the best of C and Objective-C languages, but adds a lot of new modern features like flow control, data structures, and functions, with high-level constructs like objects, protocols, closures, and generics. It also brings type safety to help developers write less error-prone code.
If you are just starting out with iOS development, it makes sense to start with Swift. The iOS community moved away from Objective-C, and every new blog post, video tutorial, code example, and framework is referencing Swift. It’s a clear sign Swift is now mature and ready to be used in production.
First steps
I wrote an article on how to become an iOS developer, so if you’re completely new to this, you could head out and read that one first. Since Swift didn’t exist then, it was written with Objective-C in mind. Nonetheless, it contains all the information you need to start with iOS development.
Resources
Books
There are quite a few books already available for Swift. The ones that stood out for me come from the Big Nerd Ranch. Their books are beginner-friendly, so you’ll have no trouble starting out. At the time of writing this article new Big Nerd Ranch books updated for Swift 3 and iOS 10 SDK are only available for preorder.
To learn the language, I recommend Swift Programming: The Big Nerd Ranch Guide, which will help you learn basic Swift features and even some advanced concepts. It will also give you a taste of the iOS SDK. By the end, you’ll even be able to write a simple app.
When you feel comfortable with Swift, it’s time to move on! The next step is iOS SDK, and that means learning the basic usage of Apple’s framework for creating iOS apps. You can learn by reading iOS Programming: The Big Nerd Ranch Guide, in which they cover everything from creating an actual Xcode project to controlling animations and persisting data with the Core Data framework.
Also, there’s an official book by Apple, The Swift Programming Language, which offers an in-depth tour of the language and its features. I’d strongly recommend going through it!
If you’ve read all of the above and want to explore more, Advanced Swift is the book for you. You can examine some high-level (like programming with generics and protocols), as well as low-level topics (for example, wrapping a C library and string internals).
Videos
Not into books? That’s alright, we feel you. Luckily, Stanford University has a fantastic course called Developing iOS 10 Apps with Swift. It’s the most popular video course for iOS development aimed at beginners. If you prefer videos, I strongly recommend starting out with that one!
Videos from Ray Wenderlich’s team are also worth checking out. They cover a wide array of topics, including some great Swift courses.
You could also skim through some sessions by Apple’s engineers. Apple holds a WWDC conference each year and has development-related talks about new SDKs and general tips concerning iOS development. They are usually advanced-level topics, so I’d recommend watching them after you feel comfortable with Swift.
Online courses
Some websites like Code School give you a chance to learn Swift directly from your web browser. The cool thing is that you don’t have to be on macOS! Their courses cover more common uses of the UIKit framework and how to use it with Swift.
Another great resource is Hacking with Swift, a set of tutorials which lead you from beginner-level topics, to more advanced ones in 39 hands-on projects! It also has an awesome introduction to Swift programming language.
Blogs
The iOS community is constantly evolving. Reading blog posts by other developers is an excellent way to learn new techniques and gain insight into how others solve problems. Quite a few of these blogs are related to Swift, and you could learn heaps from following them.
Some blogs I’d recommend:
Newsletters
There are also popular iOS weekly newsletters like This Week in Swift, iOS Dev Weekly and our own iOS Cocoa Treats in which you can find great blog posts, libraries, videos and tools related to iOS and Swift development.
And more…
These two links are the holy grail of iOS development resources. They contain tons of resources which you can use to learn Swift and the iOS SDK!
What about Objective-C?
It’s still a good idea to learn fundamentals of Objective-C. If you just started out with iOS development, you might think there is no need for it or no time to learn both languages, but it’ll pay off. You should know Objective-C because sooner or later you will stumble upon it. It’s highly unlikely you’ll only work in Swift during your professional career. Older projects are written in Objective-C and they have to be maintained. Once you are acquainted with the iOS SDK, it’s much easier to switch from Swift to Objective-C and vice-versa.
Since Objective-C has been around for quite some time, you can find a lot of answers to your iOS development related problems online. Stack Overflow is always a good starting point.
What next?
Ok, so you wrapped up this article, and now you have everything you need to become the next big name in iOS development. Bookmark this post for future reference, fire up your Xcode and good luck! ?