0

One of my apps uses two UIWindowScene configurations. One of these two configurations is the main view of the app. I want to limit the number of windows for the main view to just one. So essentially I want a classic 'one main window' and 'multiple sub windows' architecture.

This all results in the following question: Is it possible to prevent the creation of a new UIWindowScene if one has already been created with the same configuration?

Ely
  • 8,259
  • 1
  • 54
  • 67
  • Are you basically looking for a way to prevent a user from using the "New Window" feature of multitasking on an iPad? – HangarRash May 05 '23 at 14:41
  • @HangarRash Yes, but only for the main window. – Ely May 05 '23 at 14:54
  • I have no idea if this will work but try implementing the `application(_:configurationForConnecting:options:)` UIApplicationDelegate method and for the main window, return an empty configuration. Maybe that will prevent the window. – HangarRash May 05 '23 at 15:22

0 Answers0