Swift Cookbook, Third Edition, Published by Packt
This repository contains the code, examples, and resources for the book Swift Cookbook by Keith Moon,Chris Barker, Daniel Bolella and Nathan Lawlor published by Packt.
This third edition of Swift Cookbook will give you a solid understanding of programming in Swift 5.9, thanks to its recipe-based, practical approach. If you want to polish your existing skills, this book has you covered.
- Define flexible classes and structs using generics
- Use advanced operators and create custom ones
- Build iOS apps using UIKit and SwiftUI framework
- Import custom functionality into Swift Playgrounds
- Implement machine learning models using CoreML and Vision
- Manage 3D models and assets for ARKit using Swift and Xcode
Software/hardware requirements | Operating system requirements |
---|---|
Xcode 15 | macOS 14.0+ (Sonoma) |
All of the code is organized into folders. For example, Chapter02.
The code will look like the following: A block of code is set as follows:
let averageCharactersPerWord: Float = (3+5+5+3+5+4+3+4+3) / 9
print(averageCharactersPerWord) // 3.8888888
/*
phrase = "The quick brown ? jumps over the lazy ?"
// Doesn't compile
*/
- Page 111, the instances where
Result.win
appears should beFrameResult.win
Keith Moon is an award-winning iOS developer, author, and speaker based in London. He has worked with some of the biggest companies in the world to create engaging and personal mobile experiences. Keith has been developing in Swift since its release, working on projects that are both fully Swift and mixed Swift and Objective-C. Keith has been invited to speak about Swift development at conferences from Moscow to Minsk and London.
Chris Barker is a Principal Software Engineer at Jaguar Land Rover, where he leads the Mobile Application Engineering Team across the business. With over 22 years of experience in the IT industry, Chris began his career developing .NET applications for the online retailer dabs.com (now BT Shop). In 2014, Chris transitioned into mobile app development. Before joining Jaguar Land Rover, he worked on mobile apps for clients such as Louis Vuitton, L'Oréal Paris, SimplyBe, JD Williams, and Jacamo. Chris is the co-host of NS Manchester, a local iOS developer meet-up in Manchester, UK. He has been involved in authoring, co-authoring, and reviewing books for Packt Publishing since 2020.
Daniel Bolella is a lead iOS engineer at a major financial services firm. With over a decade of experience under his belt, he’s worked on everything from full stack web to mobile apps in a variety of industries, including financial, energy, and medical devices. He also enjoys writing articles and was the technical reviewer for the first and second editions of SwiftUI Cookbook. Danny thanks his amazing wife and children, who give him the love, motivation, and drive to always be better. He thanks his parents, who lovingly encourage him to pursue his passions. He gives thanks to God, for always providing love and guidance. Lastly, he thanks all who have invested and mentored him, culminating in all he has become and achieved thus far.
Nathan Lawlor is a highly skilled iOS developer with many years of experience, initially starting his career as an apprentice in web development. Nathan has worked as a professional software developer in the home and fashion retail industry, with N Brown Group plc., and is now working in the automotive industry, with Jaguar Land Rover. He has published his own independent apps to the Apple App Store and regularly posts articles on his blog. Nathan has a passion for exploring new technologies and finding ways to improve code quality and best practices.