2

I am getting the following error when I try to run one of the View Controllers I hooked up to the default GameScene.swift file.

fatal error: NSCoder not supported:

required init(coder aDecoder: NSCoder) {
    fatalError("NSCoder not supported")
}

I am intending to use SpriteKit, so that's why I was prompted to use the required initializer, but I am not sure why this is causing a problem.

1 Answer 1

1

You're not supposed to initialize using required init(coder aDecoder: NSCoder) unless you've implemented it, (which is a whole different topic that I won't digress to). Try another initializer, like -initWithNibName:bundle:.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.