After some weeks of dealing with UIKit, I wanted to start with SpriteKit. I have used the 'Game' template in Xcode with SpriteKit and have not changed anything. Now, whenever I try running the app, it crashes when loading the GameScene on this line in GameViewController.swift:
if let scene = SKScene(fileNamed: "GameScene") {
Executing po $arg1 on objc_exception_throw prints this:
*** -[NSKeyedUnarchiver decodeObjectForKey:]: cannot decode object of class (GameScene) for key (root); the class may be defined in source code or a library that is not linked
(null)
I am using Xcode 8.0 beta and iOS 10, which may be the problem, but is there any other way to fix this? (Creating and running a new project in Xcode 7.3 with using the same settings works fine, but I want to get used to Swift 3 which is why I'm using Xcode 8 beta).
Also, opening GameScene.sks in either Xcode 7.3 or 8 crashes Xcode everytime, showing this error:
Assertion failed: (*shader), function xglCompileShader, file /Library/Caches/com.apple.xbs/Sources/Jet/Jet-2.17/Jet/xgl_utils.mm, line 24.
(I assume that this may be caused by the fact that I'm using a virtual machine.)
Thanks in advance
Simon J.