You might be hearing more buzz about Apple’s new Watch product lately, but the company also announced a new programming language in 2014 — their first in at least decade.
The language, Swift, is touted as something that’s easier to follow, learn and develop in than the much older Objective-C language, which has its origins in the even older C language, and which is also influenced by the Smalltalk language. There is speculation that Swift is meant to replace Objective-C; however, Apple has essentially said otherwise. For now, at least, Swift can live alongside Objective-C code. However, if you are already developing or are thinking of developing iOS mobile apps and Mac OS X desktop/ laptop-based software, it never hurts to stay on top of new programming language developments — especially for a language like Swift that may one day replace Objective-C.
Even were Swift not to end up replacing Objective-C, it has features and abilities not available in the latter that are worth exploring — such as custom operators, command-line scripting, functions as first-class citizens, Playgrounds and much more. In fact, Swift Playgrounds are particularly useful for educators teaching students to code.
In less than a year since Swift’s reveal (WWDC 2014, June), there are already numerous tools and resources. To make it easier to find what you need, we’ve compiled a list of various tools and resources that are useful for developing iOS mobile apps in Swift — although many of the resources apply to Mac OS X software development as well.
- When using your favorite Web search engine to find Apple Swift resources, keep in mind that there is not only another programming language named Swift (for parallel programming) but it is also a protocol used by the banking industry.
- Swift is a very young programming language. When Apple released a beta version during 2014’s WWDC conference, they stated that the final version (released Sep 9, 2014) would not necessarily be compatible with pre-1.0 version code. So code published in tutorials written for Swift that were published before the official release date may produce errors with the latest version of Xcode and Swift. Swift is still a work in progress and is subject to change, so try to stick to tutorials written in late 2014 (Oct-Dec) and later. (At time of writing, Swift is at version 1.2.)
- For the reason above, use older Swift tutorials cautiously. If you get errors, it’s possibly due to more recent Swift language changes.
- IAP = In-App Purchase – a paid feature/ service available from within an iOS app.
- IDE = Integrated Development Environment.
- At time of writing, there were nearly 20,000 Swift repositories on GitHub.com.
Apple’s Swift Resources and References
- Apple iBooks: The Swift Programming Language — This 500-page iBook from Apple is *the* official guide to Swift programming.
- Apple iBooks: Using Swift with Cocoa and Objective-C — This is a another iBook from Apple which focuses on how to use Swift with Cocoa and Objective-C.
- Apple’s Swift Programming Language Reference — This is another Apple Swift reference, consisting of a tour, language guide and language reference.
- Apple Swift Blog — This is Apple’s official Swift blog.
- WWDC — While not entirely about Swift, Apple’s WWDC repository has video and other content from each year’s conference. Requires a paid Developer account.
- Apress Swift Books — Apress Swift-focused book titles include “Swift Quick Syntax Reference,” “Swift for Absolute Beginners,” “Beginning iPhone Development with Swift,” “Beginning Swift Games Development for iOS,” “Transitioning to Swift,” “Beginning Xcode: Swift Edition,” “Migrating to Swift from Android,” “Migrating to Swift from Web Development,” “Pro Design Patterns in Swift” and “More iPhone Development with Swift.”
- O’Reilly Media Swift Books — O’Reilly Media Swift-focused book titles include “iOS 8 Programming Fundamentals with Swift – O’Reilly,” “Swift Pocket Reference,” “Swift Development with Cocoa,” “iOS 8 Swift Programming Cookbook,” “iOS 8 Programming Fundamentals with Swift”, “Learning Swift” and “Introducing iOS 8.”
- Packt Publishing Swift Books — Packt Publishing Swift-focused book titles include “Swift Essentials,” “Playing with Swift,” and “Xcode 6 Essentials,” with additional titles “Learning Swift” and “Mastering Swift” coming soon.
- iTunes – Stanford — Stanford University has had iOS course materials on iTunes for years and the most recent semester reveals a switch from Objective-C to Swift.
- iTunes – Plymouth University — This is iTunes-hosted material from Plymouth University’s iOS/ Swift course.
Strongly Swift-Oriented Tutorial and Reference Sites
- Airspeed Velocity — Airspeed Velocity is a Swift blog for more advanced coding, with discussions of the more esoteric points of the language, all delivered with a touch of humor.
- Appcoda.com — AppCoda has had solid iOS tutorials for a while and recently they’ve been going over how to build a number of useful apps in Swift for iPhone, iPad and Watch, complete with finished project code.
- Coding Explorer Blog — Coding Explorer Blog offers handy tips and mini-tutorials to round out your Swift learning.
- iOS-Blog — iOS-Blog focuses on Swift and Objective-C tutorials, with a helping of tips and resource links.
- iOSCreator — iOScreator has one of the largest collections of Swift posts of the blogs in this list, posting on many topics consistently each month since Jun 2014.
- Learn Swift Online — Learn Swift Online has reference guides and resources for Swift, as well as guides outlining the differences between Objective-C and Swift.
- Natasha the Robot — Natasha the Robot is an all-Swift blog that highlights language features with discussions and code snippets, and has a healthy helping of WatchKit posts.
- NSHipster — NSHipster does a great job of covering obscure but valuable aspects of Swift, Objective-C and Cocoa.
- Owensd.io — Owensd.io, by David Owens, has a surprisingly large collection of tips, tricks and musings on Swift – some simple, some esoteric.
- Raywenderlich.com — RayWenderlich.com is one of the better iOS tutorial sites and has recently shifted to a strong focus on Swift. Check out their Swift cheatsheet.
- Sprite Kit and Swift Lessons — The Sprite Kit and Swift Lessons site offers free and paid tutorials with an emphasis on mobile gaming apps.
- Swift | Making App Pie — Making App Pie has a collection of Swift posts covering a wide range of topics, offers a free e-book on Swift, and has a short video tutorial series, KinderSwift, for Swift beginners.
- Swift Developer Weekly — Swift Developer Weekly is a curated collection of Swift-specific iOS development article/ resource links available in Web page form and sent out in a synopsis e-newsletter.
- The Swift Language YouTube Playlist — This is a massive, multi-source, 250+ YouTube video playlist about Swift programming.
- We Heart Swift — Claiming to have one of the first blog posts about Swift, WeHeartSwift.com has a collection of tips, links, discussions and short tutorials, with a beginner course coming soon.
Casual Swift Resources, Tutorials and Videos
- AppDesignVault — App Design Vault has solid if infrequent iOS app-building tutorials, now in Swift flavor, as well as tips on app marketing and the occasional free design themes – with an agenda to give developers a leg up on app design.
- Cartoon Smart Swift + Sprite Kit Video Tutorials — CartoonSmart has two 2-hour-total video series – one on general Swift concepts and the other on Swift with Sprite Kit, both aimed towards mobile game app development.
- Code with Chris — Code with Chris is one of the many personal coding blogs that cover more than just mobile, though newer iOS tutorials focus mainly on Swift.
- Jameson Quave — Jameson Quave, author of the book “Developing iOS 8 Apps In Swift,” has a free Swift tutorial series that builds an app which interacts with Apple iTunes’ to get music album previews.
- Medium — While Medium is a very general publishing platform where anyone can contribute articles about anything, there are a substantial number of meaty Swift articles worth browsing.
- Realm — If your app needs a local database on your iOS (or Android) device, Realm is a free alternative (paid support available) that is touted as easier to use and more productive than SQLite or Core Data. Also works for Mac OS X.
- Roadfire Software — Roadfire Software has a free 5-part “Getting Started with Swift” guide, available with free signup.
- Skip Casts Videos — Skip Casts Videos is a YouTube series on Swift programming from SkipCasts.com (free and paid Swift tutorials) and SwiftStub.com (see elsewhere in this list).
- Swift Data Structures Series — Wayne Bishop has put together an immensely useful collection of articles on common algorithms and data structures found in computer science, complete with open source code in Swift.
- Thinkster — Thinkster is a multi-language Web and mobile coding tutorials blog, with a “Better Way to Learn Swift” tutorial that is a collection of steps and resource links.
- Tuts+ — Tuts+ covers a broad range of coding tutorials for various programming languages, but it does have a growing collection of Swift tutorials in their mobile app development coverage.
Lists and Aggregators
- GitHub’s Trending Swift Repositories — If you love open source code, you can track trending Swift repositories on GitHub to know what’s hot.
- LearnSwift.tips — LearnSwift.tips is a curated list of Swift resources from numerous sites.
- SoSoSwift — SoSoSwift is an aggregator of Swift tutorial and resource links shared by users.
- Swift Tutorials — If you’re short on research time, use Swift Tutorials’ curated posts that link to useful examples and tutorials from other sites.
Swift Bootcamps, Code Libraries and Helpers
- Apple Developer Forums – Swift — Visit Apple’s Swift developer forum to pick up tips, share them, or ask questions.
- Swift on Google Groups — If you prefer Google Groups, here is the Swift Language group discussions.
- StackOverflow Swift Questions — Ask questions, share answers on StackOverflow’s Swift Questions pages.
- Swift-related Meetups — When you need to socialize but want it to be about Swift, check out the Swift Meetup events in your area.
- SwiftToolbox — SwiftToolbox is an alphabet-indexed, multi-sourced collection of Swift resources for iOS and OS X to which you can add libraries.
Apps, Code Editors, Code Bins and Development Environments
- CodeRunner — Skip doing Xcode project setup and run Swift and other language code in a single editor with code completion – $9.99. Note: Latest version not available on Mac App Store; see site for details.
- RunSwift — RunSwift is a Web browser-based “code bin” that lets you type Swift code on the left, run it and see results on the right.
- SwiftStub — SwiftStub is a “code bin” which lets you run Swift code in a Web browser window
- Swifty — Squeeze moments of free time out for Swift learning with the Swifty app (iPhone and iPad) and its over 200 interactive tutorials (13 free; more available with In-App Purchase).