In The Swift Developer's Cookbook, renowned author Erica Sadun joins powerful strategies with ready-to-use Swift code for solving everyday development challenges.
As in all of Sadun's programming best-sellers, The Swift Developer's Cookbook translates modern best practices into dozens of well-tested, easy-to-apply solutions. This book's code examples were created in response to real-world questions from working developers to reflect Swift's newest capabilities and best practices. Each chapter groups related tasks together. You can jump straight to your solution without having to identify the right class or framework first.
Sadun covers key Swift development concepts, shows you how to write robust and efficient code, and helps you avoid common pitfalls other developers struggle with. She offers expert strategies for working with this immensely powerful language, taking into account Swift's rapid evolution and its migration tools.
Whether you're moving to modern Swift from Objective-C, from older versions of the Swift language, or from the world of non-Apple languages, this guide will help you master both the "how" and "why" of effective Swift development. Industry recruiters are scrambling to find Swift developers who can solve real problems and produce effective working code. Get this book, and you’ll be ready.
Writing effective Swift code that communicates clearly and coherently to the compiler, your team, and to "future you," who will be maintaining this code
Using Xcode to handle changes in Swift's language constructs as the language evolves
Building feedback, documentation, and output to meet your development and debugging needs
Making the most of optionals and their supporting constructs
Using closures to encapsulate state and functionality and treat actions as variables for later execution
Leveraging control flow with innovative Swift-specific statements
Working with all Swift types: classes, enumerations, and structures
Using generics and protocols to build robust code that expands functionality beyond single types
Making the most of the powerful Swift error system
Working with innovative features such as array indexing, general subscripting, statement labels, custom operators, and more