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

8. Solve Problems

Lesson Complete

Play Next Lesson
Save for later
About this episode
See versions

See course reviews

See forum comments
Cinema mode Mark as Complete Download course materials
Previous episode: 7. Challenge: Add View Modifiers Next episode: 9. Conclusion

This video was last updated on Jan 11 2022

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 :]