Swift Apprentice Updated for Swift 4.2

Swift Apprentice has been completely updated for Swift 4.2 as part of our iOS 12 Launch Party! By Chris Belanger.

Save for later
You are currently viewing page 2 of 2 of this article. Click here to view the first page.

Section IV: Advanced Topics

The final section of the book covers more advanced topics in Swift. You’ll learn about specific things, such as how to handle problems that come up as your code runs, as well as about more general things such as memory management, which will help you understand some of Swift’s behind-the-scenes mechanisms.

In this section, you’ll delve into some important but more advanced topics to round out your Swift apprenticeship:

  • Chapter 18, Access Control and Code Organization: Swift gives you powerful tools for hiding complexity and organizing your code into easier to digest units. This chapter details how to do that.
  • Chapter 19, Custom Operators, Subscripts, Keypaths: You’ll learn how you can define your own operators and subscripts to make your types feel even more like built-in language constructs. You will also learn about type-safe keypaths introduced in Swift 4.
  • Chapter 20, Pattern Matching: With pattern matching you can accomplish more — with less typing. You’ll master all of its many forms in this chapter.
  • Chapter 21, Error Handling: In the real world, some errors cannot be avoided. Handling them gracefully is what sets apart mediocre code from great code.
  • Chapter 22, Encoding and Decoding Types: You will learn about the type serialization system introduced in Swift 4 with particular emphasis on the JSON format.
  • Chapter 23, Asynchronous Closures and Memory Management: This chapter digs into the details of Swift memory management examining the relation between objects. It shows you how you avoid common leaks.
  • Chapter 24, Value Types and Value Semantics: Value semantics have a clear advantage over reference semantics in terms of the local reasoning but can lead to inefficiency for large objects. This chapter shows you how to get the best of both worlds.
  • Chapter 25, Protocol-Oriented Programming: From the standard library to user authored generics, Swift is a protocol-based language. In this chapter you’ll see how to get all of the benefits associated with object-oriented programming while being able to avoid most of the difficulties.

About the Authors

Of course, our book would be nothing without our team of experienced and dedicated authors:

Ehab Amer is a very enthusiastic Lead iOS developer with a very diverse experience, from building games to enterprise applications and POCs, especially when exploring new technologies. In his spare time, TV shows take the majority, followed by video games. When away from the screen, he goes with his friends for escape room experiences or to explore the underwater world through diving.

Alexis Gallagher is a software engineer who is always looking for the conceptual deep dive and always hoping to find pearls down at the bottom. When he’s not coding, he’s out and about in sunny San Francisco.

Matt Galloway is a software engineer with a passion for excellence. He stumbled into iOS programming when it first was a thing, and has never looked back. When not coding, he likes to brew his own beer.

Eli Ganim is an engineering manager at Facebook. He is passionate about teaching, writing, and sharing his knowledge with others.

Ben Morrow delights in discovering the unspoken nature of the world. He’ll tell you the surprising bits while on a walk. He produces beauty by drawing out the raw wisdom that exists within each of us.

Cosmin Pupăză is a software developer and tutorial writer from Romania. He has worked with more than a dozen programming languages over the years, but none of them has made such a great impact on himself as the advent of Swift. When not coding, he either plays the guitar or studies WWII history. Cosmin blogs about Swift at cosminpupaza.wordpress.com.

Steven Van Impe is a computer science lecturer at the University College of Ghent, Belgium. When he’s not teaching, Steven can be found on his bike, rattling over cobblestones and sweating up hills, or relaxing around the table, enjoying board games with friends. You can find Steven on Twitter as @svanimpe.

Free Beginning Swift Tutorials

To help celebrate the launch, we’re hard at work updating our free Getting Started with Swift tutorials, which are based directly on the content in the book. They’ll be out in just a few weeks — stay tuned to the site for updates!

Part of the iOS 12 Launch Bundle

So many of you have asked for a book bundle to go with the iOS 12 update season, and we’re happy to announce the release of the iOS 12 Launch Party Bundle!

This three-book bundle contains our newest iOS 12 books:

This bundle is on sale for only $99.99 — that’s a savings of 33%! But don’t wait, since this bundle won’t be available forever.

Where to Go From Here?

Swift Apprentice, Fourth Edition is now 100% complete, fully updated for Swift 4.2 and is available today!

  • If you’ve already bought the Swift Apprentice digital edition, you can log in to your account and download the new book in PDF and ePub format immediately on our store page.
  • If you don’t have the Swift Apprentice yet, you can grab your own very own copy in our online store.

And to help sweeten the deal, the digital edition of the book is on sale for $49.99! But don’t wait — this sale price is only available for a limited time.

Speaking of sweet deals, be sure to check out the great prizes we’re giving away this year with the iOS 12 Launch Party, including over $9,000 in giveaways!

To be eligible for for this epic iOS 12 giveaway, all you have to do is leave a comment on the original launch post, letting us know which book or course is your favorite on this list — or which upcoming book or course you’re most excited about!

We hope you enjoy this update to one of our most-loved books. Stay tuned for more book releases and updates coming soon!

Chris Belanger


Chris Belanger


Over 300 content creators. Join our team.