© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2022
W. WangPro iPhone Development with SwiftUIhttps://doi.org/10.1007/978-1-4842-7827-7_18

18. Handling Errors

Wallace Wang1  
(1)
San Diego, CA, USA
 

In a perfect world, you would write code, run it, and it would work exactly as you expected. Unfortunately, we don’t live in a perfect world and, in our world, writing software is never simple and easy. In most cases, you’ll write code that almost works, but not quite. Then the majority of your time will be spent trying to tweak your code to make it finally work the way you want.

When writing any type of software, always expect the unexpected. In other words, you can never anticipate all possible problems your program ...

Get Pro iPhone Development with SwiftUI: Design and Manage Top Quality Apps now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.