Explore the Default Template

Apple Game Frameworks and Technologies — by Tammy Coron (21 / 193)

The Pragmatic Programmers
The Pragmatic Programmers

--

👈 Create the Project | TOC | Clean Up the Default Templ ate 👉

The default iOS Game template includes some default files like AppDelegate.swift and Main.storyboard. If you’ve built other iOS apps before, you may recognize both of these files. The AppDelegate.swift file handles application lifecycle events,[18] and the Main.storyboard file contains the main view controller.

The default template also includes files specific to SpriteKit, like Actions.sks and GameScene.sks. Most of the time, you’ll replace or modify these two files; however, using a template is preferred as it saves time in the long run.

Before you get too far into developing your first game with SpriteKit, build and run the default project to ensure everything is working. Start by setting the destination for the active scheme to the iPhone 11 Pro Max. To select the destination, click the currently selected destination on the Scheme menu located to the right of the active scheme, and choose the iPhone 11 Pro Max from the list of available destinations, like so:

images/CreatingScenesWithSpritesAndNodes/spritekit-active-scheme-callouts.png

Once you’ve set the active scheme destination, build and run the project by selecting Product ▶ Run from Xcode’s App menu. Alternatively, you can use the Run

--

--

The Pragmatic Programmers
The Pragmatic Programmers

We create timely, practical books and learning resources on classic and cutting-edge topics to help you practice your craft and accelerate your career.