Swift in Depth
Tjeerd in 't Veen
  • MEAP began September 2017
  • Publication in Summer 2018 (estimated)
  • ISBN 9781617295188
  • 475 pages (estimated)
  • printed in black & white
Swift is more than just a fun language to build iOS applications with. It features a host of powerful tools that, if you know how to effectively use them, can help create even better apps with clean, crystal-clear code and awesome features. Swift in Depth is designed to help you unlock these tools and quirks and get developing next-gen apps!
Table of Contents detailed table of contents

1. Introducing Swift in depth

1.1. Why Swift?

1.2. Why this book?

1.3. Is this book for you?

1.4. What this book is not

1.5. A big emphasis on practical scenarios

1.6. How to make the most of this book

1.7. Swift version

1.8. Chapter layout

1.8.1. Chapter 2: Modeling data with enums

1.8.2. Chapter 3: Understanding initializer gotchas

1.8.3. Chapter 4: Writing cleaner properties

1.8.4. Chapter 5: Making optionals second nature

1.8.5. Chapter 6: Being a Swifty citizen

1.8.6. Chapter 7: Writing reusable code

1.8.7. Chapter 8: Understanding map and flatMap

1.8.8. Chapter 9: Fighting the pyramid of doom

1.8.9. Chapter 10: Error handling 2.0

1.8.10. Chapter 11: Putting the pro in Protocol Oriented Programming

1.8.11. Chapter 12: Building a datastructure

1.8.12. Chapter 13: Safer Swift

1.9. Strap on your seatbelt

2. Modeling data with enums

2.1. Or vs and

2.1.1. Modeling data with a struct

2.1.2. Turning a struct into an enum

2.1.3. Exercises

2.2. Enums for polymorphism

2.2.1. Storing multiple types in one array

2.2.2. Exercises

2.3. Enums instead of subclassing

2.3.1. Creating a model for a workout app

2.3.2. Creating a superclass

2.3.3. The downsides of subclassing

2.3.4. Refactoring a data model with enums

2.3.5. Deciding on subclassing or enums

2.3.6. Exercises

2.4. A safer use of strings

2.4.1. Dangers of raw values

2.4.2. Matching on Strings

2.4.3. Exercises

2.4.4. Finishing up

2.5. Summary

3. Understanding initializers

3.1. Struct initializer rules

3.1.1. Custom initializers

3.1.2. Struct initializer quirk

3.1.3. Exercises

3.2. Class initializers

3.2.1. Creating a board game superclass

3.2.2. BoardGame’s initializers

3.2.3. Creating a subclass

3.2.4. Losing convenience initializers

3.2.5. Getting the superclass initializers back

3.2.6. Exercises

3.3. Minimizing class initializers

3.3.1. Convenience overrides

3.3.2. Subclassing a subclass

3.3.3. Exercise

3.4. Required initializers

3.4.1. Factory methods

3.4.2. Protocols

3.4.3. Foregoing required initializers

3.4.4. Exercises

3.4.5. Finishing up

3.5. Summary

4. Writing cleaner properties

5. Making optionals second nature

6. Being a Swifty citizen

7. Writing generic code

8. Understanding map and flatMap

9. Fighting the pyramid of doom

10. Error handling 2.0

11. Putting the pro in Protocol Oriented Programming

12. Building a datastructure

13. Safer Swift

About the Technology

Apple's Swift is the standard language for iOS and Mac development. It's is a modern marvel—easy to pick up, comfortable to use, and loaded with features. After you master the basics, there's a rich, deep world of Swift skills for delivering cleaner, faster code. This book distills the hard-won experience of seasoned Swift developer Tjeerd in 't Veen into a collection of high-value, hard-to-find techniques that will help set you and your Swift applications apart.

About the book

Swift in Depth builds on your core Swift language skills, introducing you to powerful techniques like using higher-order functions, generics, efficient error handling, and protocol-oriented programming. You'll explore each new concept through concrete examples, enlightened explanations, and engaging exercises. Some of this stuff is difficult, so you'll really appreciate the careful, crystal clear writing and precise illustrations. When you're finished, you'll be a more productive Swift developer, and a happier Swift developer, as well!

What's inside

  • Adding advanced Swift features to your code
  • Writing reusable code with generics
  • Iterators, sequences, and collections
  • Protocol oriented programming

About the reader

Readers should have some prior experience with the basics of Swift.

About the author

Tjeerd in 't Veen is a senior software engineer and architect who builds iOS apps. Having worked together with many developers, he currently helps creating clean, scalable architectures in the mobile division of a large international banking firm.

Manning Early Access Program (MEAP) Read chapters as they are written, get the finished eBook as soon as it’s ready, and receive the pBook long before it's in bookstores.
Buy
MEAP combo $49.99 pBook + eBook + liveBook
MEAP eBook $39.99 pdf + ePub + kindle + liveBook

FREE domestic shipping on three or more pBooks