I am constructing a Multiplatform Apple app, and on iPadOS, I am making an attempt to configure the app in order that the customers cannot create a number of home windows for an app, however can nonetheless freely place the app round.
In contrast to macOS, disabling the power to create new home windows within the menu bar does not eliminate the power to create new home windows.
import SwiftUI
@major
struct MyApp: App {
// Run code to routinely stop the app after closing its window on macOS
#if os(macOS)
@NSApplicationDelegateAdaptor(AppDelegate.self) var appDelegate
#endif
var physique: some Scene {
WindowGroup {
ContentView()
}.instructions {
// Disguise the brand new window button
CommandGroup(changing: CommandGroupPlacement.newItem) {
}
}
#if os(macOS)
Settings {
MacSettingsView()
}
#endif
}
}
On the iPadOS model, nevertheless, customers can nonetheless create new home windows by tapping on the app icon within the dock and choosing the brand new window button within the high left nook (or by dragging the apps icon from the dock like in earlier variations)

Utilizing UIRequiresFullScreen (older plist setting used to disable multitasking options) did not work as all it did was make the app go to a fallback design with a protected zone for the window buttons


