SpriteKit - didMovetoView is not called
<p>This is my code for the view controller</p>

<pre><code>import UIKit
import SpriteKit
import GameplayKit
class GameViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()

    if let view = self.view as! SKView? {
        // Load the SKScene from 'GameScene.sks'
        if let scene = SKScene(fileNamed: "GameScene") {
            // Set the scale mode to scale to fit the window
            scene.scaleMode = .aspectFill
            // Present the scene
            view.presentScene(scene)
        }

        view.ignoresSiblingOrder = true

        view.showsFPS = true
        view.showsNodeCount = true
    }
}
</code></pre>

<p>And this is my code for the GameScene</p>

<pre><code>import SpriteKit
import GameplayKit

    class GameScene: SKScene {
       override func didMove(to view: SKView) {
            print("gets called")
        }
</code></pre>

<p>But for some reasons, in the debug area, it didn't print "gets called", which indicates that didMove didn't even get called. What's happening here? Did I miss anything?</p>