if you are using Swift and not objC the logic is the same and you can take some help on how to set the 'self.window' on 'SceneDelegate' from this (https://dev.to/kevinmaarek/add-a-scene-delegate-to-your-current-project-5on)
Topic:
App & System Services
SubTopic:
Core OS
Tags: