Your First iOS & SwiftUI App: An App from Scratch

Jan 11 2022 · Swift 5.5, iOS 15, Xcode 13

Part 1: Getting Started with SwiftUI

08. Solve Problems

Episode complete

Play next episode

About this episode

Leave a rating/review

See forum comments
Cinema mode Mark complete Download course materials
Previous episode: 07. Challenge: Add View Modifiers Next episode: 09. Conclusion
Transcript: 08. Solve Problems

One of the biggest pitfalls when you’re first learning iOS development is understanding what to do if something goes wrong, so next I’ll show you how you can solve common beginner mistakes.

I recommend you watch this lecture even if you successfully completed the previous exercise, because chances are you will eventually make these mistakes, so it’s good to know how to deal with them. Let’s dive in!

  • Show typo mistake
  • Show case sensitivity mistake
  • Show missing parenthesis
  • Show missing curly brace

So far we’ve been dealing with errors - which are in red, but sometimes Xcode will give you a warning, which is in yellow.

What’s the difference? Well, errors are fatal. If you get one, you cannot run the app till the error is fixed.

On the other hand, warnings are informative. Xcode just says, “You probably didn’t mean to do this, but go ahead anyway.”

In my opinion, it is best to treat all warnings as if they were errors. Fix the warning before you continue and only run your app when there are zero errors and zero warnings. That doesn’t guarantee the app won’t have any bugs, but at least they won’t be silly ones :]