Book description
Now updated for Swift 5! Swift is more than just a fun language to build iOS applications with. It features a host of powerful tools that, if effectively used, can help you 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, web services, and more!
About the Technology
It’s fun to create your first toy iOS or Mac app in Swift. Writing secure, reliable, professional-grade software is a different animal altogether. The Swift language includes an amazing set of high-powered features, and it supports a wide range of programming styles and techniques. You just have to roll up your sleeves and learn Swift in depth.
About the Book
Swift in Depth guides you concept by concept through the skills you need to build professional software for Apple platforms, such as iOS and Mac; also on the server with Linux. By following the numerous concrete examples, enlightening explanations, and engaging exercises, you’ll finally grok powerful techniques like generics, efficient error handling, protocol-oriented programming, and advanced Swift patterns. Author Tjeerd in ’t Veen reveals the high-value, difficult-to-discover Swift techniques he’s learned through his own hard-won experience.
What's Inside
- Covers Swift 5
- Writing reusable code with generics
- Iterators, sequences, and collections
- Protocol-oriented programming
- Understanding map, flatMap, and compactMap
- Asynchronous error handling with Result
- Best practices in Swift
About the Reader
Written for advanced-beginner and intermediate-level Swift programmers.
About the Author
Tjeerd in 't Veen is a senior software engineer and architect in the mobile division of a large international banking firm.
Quotes
An excellent guide to using the advanced features of Swift to produce clean, high-performing code. The content is masterfully delivered, making it easy to quickly level-up your skills.
- Jason Pike, Atlas RFID Solutions
Highly recommended to anyone interested in the Apple platform. For the novice who wants to become an expert, this is definitely where you should start!
- Helmut Reiterer, Revenue Recovery Solutions
Because Swift is so new, it’s hard to find good resources to learn it. Look no further than this book.
- Tyler Slater, Jolt
Publisher resources
Table of contents
- Copyright
- Brief Table of Contents
- Table of Contents
- Preface
- Acknowledgements
- About this Book
- Chapter 1. Introducing Swift in depth
- Chapter 2. Modeling data with enums
- Chapter 3. Writing cleaner properties
-
Chapter 4. Making optionals second nature
- 4.1. The purpose of optionals
- 4.2. Clean optional unwrapping
- 4.3. Variable shadowing
- 4.4. When optionals are prohibited
- 4.5. Returning optional strings
- 4.6. Granular control over optionals
- 4.7. Falling back when an optional is nil
- 4.8. Simplifying optional enums
- 4.9. Chaining optionals
- 4.10. Constraining optional Booleans
- 4.11. Force unwrapping guidelines
- 4.12. Taming implicitly unwrapped optionals
- 4.13. Closing thoughts
- Summary
- Answers
- Chapter 5. Demystifying initializers
- Chapter 6. Effortless error handling
- Chapter 7. Generics
- Chapter 8. Putting the pro in protocol-oriented programming
- Chapter 9. Iterators, sequences, and collections
- Chapter 10. Understanding map, flatMap, and compactMap
- Chapter 11. Asynchronous error handling with Result
-
Chapter 12. Protocol extensions
- 12.1. Class inheritance vs. Protocol inheritance
- 12.2. Protocol inheritance vs. Protocol composition
- 12.3. Overriding priorities
- 12.4. Extending in two directions
- 12.5. Extending with associated types
- 12.6. Extending with concrete constraints
- 12.7. Extending Sequence
- 12.8. Closing thoughts
- Summary
- Answers
- Chapter 13. Swift patterns
- Chapter 14. Delivering quality Swift code
- Chapter 15. Where to Swift from here
- Index
- List of Figures
- List of Listings
Product information
- Title: Swift in Depth
- Author(s):
- Release date: December 2018
- Publisher(s): Manning Publications
- ISBN: 9781617295188
You might also like
book
Hands-On Design Patterns with Swift
From learning about the most sought-after design patterns to a comprehensive coverage of architectural patterns and …
book
Head First Swift
What will you learn from this book? Swift is best known as Apple's programming language of …
video
A Beginner's Guide to Creating iPhone Apps for iOS 15 Using Swift UI
If you are looking for a course that is fun, for complete beginners, and gets straight …
book
iOS 15 Programming Fundamentals with Swift
Move into iOS development by getting a firm grasp of its fundamentals, including the Xcode 13 …