I'm creating a universal app but I have issues scaling my scene to display correctly on the iPhone X.
I'm using a single scene size of 1536, 2048 and scaling it down to other devices using aspectFill. My scene is displayed correctly on every device except the iPhone X. Objects in my safe area are cut off on the left and right side.
What can I do to fix this issue?
override func viewDidLoad() {
super.viewDidLoad()
let scene = GameScene(size:CGSize(width: 1536, height: 2048))
let skView = self.view as! SKView
scene.scaleMode = .aspectFill
skView.presentScene(scene)
}
My scene setup is based on this answer iOS Universal Device App with SpriteKit, how to scale nodes for all views?