I cannot integrate gamecenter with my spritekit

I am learning at Swift, but I cannot integrate with swift and spritekit gamecenter without storyboard

This is my structure code:
MainController.swift
MainScene.swift
SplashViewLayout.swift
TitleViewLayout.swift
AppDelegate.swift

Could anyone help me? I will put in credits or greetings in the code or game description :) as a collaboration
You can present a Game Center view controller without a storyboard. Your SpriteKit scene has a root view controller.
Code Block
let sceneViewController = self.view?.window?.rootViewController

Create an instance of GKGameCenterViewController.
Code Block
let viewController = GKGameCenterViewController()

Configure the Game Center view controller. Present the Game Center view controller from the scene view controller.
Code Block
sceneViewController?.present(viewController, animated: false, completion: nil)

Choose Help > Developer Documentation in Xcode to read the Game Center documentation, which is in the Graphics and Games section. There's an article on displaying the Game Center Dashboard and a class reference for GKGameCenterViewController.

Ray Wenderlich made their 2D game development book freely available on GitHub. The book has two chapters on using Game Center.

github.com/raywenderlich/deprecated-books

I cannot integrate gamecenter with my spritekit
 
 
Q