Diving Deep into Swift
4.3 (7 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
70 students enrolled

Diving Deep into Swift

Swift guide to mastering Swift technology
4.3 (7 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
70 students enrolled
Created by Packt Publishing
Last updated 9/2018
English [Auto]
Current price: $139.99 Original price: $199.99 Discount: 30% off
5 hours left at this price!
30-Day Money-Back Guarantee
This course includes
  • 1.5 hours on-demand video
  • 9 articles
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
Training 5 or more people?

Get your team access to 4,000+ top Udemy courses anytime, anywhere.

Try Udemy for Business
What you'll learn
  • Learn advanced protocol-oriented programming
  • Create original custom operator and operator methods
  • Understand and extend standard library collections and protocols
  • Learn flow control tricks
  • Get introduced to Carthage, Swift Package Manager, and particular CocoaPods
  • Become acquainted with Cocoa and the Objective-C legacy of Apple’s platforms
Course content
Expand all 24 lectures 02:32:54
+ Swift’s Memory Management Model
5 lectures 21:45
This video provides an overview of the entire course.
Preview 01:44
We will explain what Swift's memory management model is, and how it works.
Automatic Reference Counting

Most of the time, ARC just works and we don't have to think about it. However, the system is not perfect and if you aren't careful there are some pitfalls you can fall into. The main of which is retain cycles.

Retain Cycles

Now that we have seen how to solve retain cycles between class values, there is also a final and very subtle area in which we must handle memory management carefully; closures, in certain circumstances. In this section, we will look into this carefully

Text section: Closure retain cycles and capture lists
Test Your Knowledge
5 questions
In this Section, we will learn about Swift error handling, and in particular how to call methods in the Foundation framework that can throw errors. In this section, we will also cover defining your own custom errors, and also some further advanced features of closures.
Text Section: Errors and Closures
+ Managing Concurrency with (Grand Central) Dispatch
5 lectures 30:19

There are a number of task and concurrency management technologies in the Cocoa ecosystem. What are they, what are their characteristics?

Cocoa Concurrency Technologies - Introducing Dispatch

In the previous section we introduced a lot about Dispatch, and its queue types. In this section we will focus in on serial queues, which are really the most powerful type of Dispatch queue

Serial Queues

Serial queues are Dispatch's more powerful feature, however there are a number of additional features this library provides that you will be able to use often

Other Dispatch Features
Test Your Knowledge
In Swift: Exploring the Key Concepts we introduced Swift's generic programming features. We are now ready to take this further and begin our journey towards mastering not only generics but also protocol-oriented programming. We will do this by guiding you through using generic constraints to design algorithms based on the capabilities of certain types. We will also take a look at adopting operators on your types, and even define your own custom operators.
Text Section: Generics and Custom Operators
+ Swift Dependency Management
5 lectures 44:01

Adding third-party libraries to your projects, and maintaining them long-term is not a simple task, and especially if you are relatively new to Xcode and its build system. Fortunately, there are a number of tools available that you can use

Preview 19:20

The third-party Cocoa developer community is large nowadays and there are a huge number of libraries. How do you get started discovering libraries, and choosing high quality solutions?

Recommended Swift CocoaPods
Test Your Knowledge
We have already covered a number of deeper Foundation topics in Exploring Swift. We will return to some of these more abstract topics, and cover some of the most important design patterns that permeate APIs in Foundation. We will cover shared instances, delegation and notifications. We will also look a bit at some Objective-C legacy patterns that you will encounter when using these APIs.
Text Section: Foundation Design Patterns

You will soon be ready to start writing large and complex application in Swift. Therefore, it's time to start considering unit testing your Swift code to ensure your applications are maintainable long term. We'll cover the XCTest framework; understanding, creating and navigating test bundles as well as writing and executing unit tests.

Please find the video demo of the text section in the support files

Text Section: Unit Testing Swift Code
+ Sequence and Collection
4 lectures 25:33
What is the role that Sequence and Collection play in the Standard Library? How can we adopt them on our own types?
Implementing Sequence

Once we have adopted Sequence, how can we do so with Collection? What is the difference?

Implementing Collection

What is the benefit of adopting these collection protocols when appropriate?

Why Adopt Sequence or Collection?
Test Your Knowledge
+ Asynchronous Task Management with Operation/Operation Queue
2 lectures 08:17

What is are the Operations APIs? How to they differ from Dispatch? When is it appropriate to use either API?

Introducing Operations

What are operation dependencies, and how is this feature a key distinction between operations and Dispatch? Dispatch has no concept of dependencies, but operations can use these to compose operations into complex composed hierarchies.

Understanding Operation Dependencies
+ Protocol Extensions and Protocol Oriented Programming (POP)
3 lectures 22:57

What are protocol extensions, and how to they provide a better solution than object-oriented inheritance?

  • Look at traditional single and multiple inheritance allow code reuse, but also their problems and limitations
  • Focus on what features we really want when we share behavior between types
  • Introduce protocol oriented programming, and protocol extensions that gives us all of this functionality, but without the drawbacks on inheritance

Introducing Protocol Extensions

Now that we understand what protocol extensions are, what more can we do with them? What can we learn about how the Swift Standard Library actually works?

  • Start by showing how to evolve a generic type, showing some of the similarities and contrasts between generics and protocol-oriented programming
  • Implement a protocol extension and discover how the protocol encapsulates the information we need
  • Discover added functionality to all types that adopt the protocols; the Standard Library's, our own, or even third-party types

Extending Collection Protocols
Swift is intended to be a systems programming language for now and for the future. So, interoperability with the huge world of low-level C libraries is very important. It's possible that bridges for other languages, in particular C++ will also be added in the future. We'll look at how you can import and use such a library with your Swift code, and touch on more advanced topics regarding low-level management of Swift type memory 

Please find the video demo of the text section in the support files
Using C Libraries with Swift
  • You need to have a fluency in Swift’s fundamentals to take this course. You should already be able to write Swift code quite comfortably.

Swift is a general-purpose, multi-paradigm, compiled programming language developed by Apple Inc. for iOS, macOS, watchOS, tvOS, and Linux.

This course takes you deep into the Swift language. It aims to take you beyond the fluency you need for everyday Swift development, and towards becoming a true master and understand how the language works at a deep level.

You will learn Swift development, mostly using Xcode on Apple platforms, along with the ability to port your knowledge to Ubuntu Linux. You will learn stylish tricks to write elegant, professional and powerful Swift code.

With this Swift course, you will have a working understanding of how the Objective-C heritage of Apple’s platforms shapes many of its APIs. This is essential knowledge to take you past from an intermediate level into true mastery.

By the end of this course, you will be working heavily with Xcode, and will be ready to tackle graphical user interface development on macOS, iOS, watchOS and tvOS. Finally, you will be ready to build your own Swift applications with ease

About the Author

Jonathan Crooke has been a professional developer for Apple platforms since 2010, and has shipped successful apps with user-bases in the millions, working for companies such as SoundCloud, Zalando, Memrise, and EyeEm. He has worked on the iPhone, iPad, Apple Watch and MacOS, and has a number of popular libraries available on GitHub. With a previous career in teaching, Jonathan has considerable experience putting himself in the shoes of the learner, and communicates clearly without excessive use of jargon.

Who this course is for:
  • If you aren’t satisfied with being just a good developer, and if you want to take the extra steps to become a true master, then this is the right course for you.