/CyclicalAssets/Asset.swift:25:5: Return from initializer without initializing all stored properties
getting this error from Xcode.
if i add owner = nil to the initialiser then it goes away so it would appear that it is required that optional properties must also be set in the initialiser of a class.
I had the same issue. The problem was that I hand-typed my code (rather than copy & paste from my e-book) and I made a small typo. I had entered the following:
let owner: Person?
But the book uses the following:
var owner: Person?
Even after going over the code multiple times I didn’t catch this small change. With just three tiny letters, it’s easy to overlook!