How do you add a new SpriteKit scene to a Swift Playgrounds App project

Xcode 13.2 adds the Swift Playgrounds App project template that works with the upcoming version of Swift Playgrounds. The project template creates an iOS SwiftUI app. SwiftUI has a sprite view to show SpriteKit scenes so I tried adding a new SpriteKit scene to the project. Choosing File > New > File adds a Swift file to the project. The New File Assistant doesn't open.

I can add an existing SpriteKit scene to the project. I can view and edit the scene. I can also show the scene in a sprite view so I know this project template supports SpriteKit.

Adding an existing SpriteKit scene also adds a Resources folder to the project. When I choose to create a new file from the Resources folder, the New File Assistant opens. But SpriteKit Scene is not one of the file types I can add.

How do I add a new SpriteKit scene file to a Swift Playgrounds App project?

  • I have a related problem. In fact, we can't add any of the Resource types but the Asset Catalog through the New File Assistant. When I drag a Reality Composer Project to the Playgrounds App, it didn't allow to target it.

  • Have you found any answers to this? I am having no luck.

Add a Comment