Software. Finance. Entrepreneurship.
<<< Back to All Articles

Debugging Swift Errors

May 4, 2019 | 1 minute read | @charlieinthe6

Below is an evolving list of Swift error messages and their solutions.

As I learn more Swift, and debug more iOS applications, I plan to add to this list!


  1. ERROR: Class 'ViewController' has no initializers
    • LIKELY CAUSE: A variable exists in the class 'ViewController' that hasn't been assigned a default value. In swift, all instantiated variables must have a default value; this value can be set by the init() method, or inline in the class declaration
    • SOLUTION: Assign a default value to the variable