SwiftUI's Settings scene for macOS does not show up on a Catalyst app

I have a simple app with an iOS target that is configured for iPhone, iPad, and Mac, making it a Catalyst app. On Xcode 12.0 Beta 1, I tried adding a Settings scene to my app. The documentation page says it is compatible with both macOS 11.0+ and Mac Catalyst 14.0+. The entirety of my app is this:

Code Block swift
import SwiftUI
@main
struct TestSettingsApp: App {
@SceneBuilder var body: some Scene {
WindowGroup {
Text("Hello, world!").padding()
}
#if os(macOS)
Settings {
Text("Settings here.")
}
#endif
}
}


Based on the WWDC 2020 Whats new in SwiftUI video (4:50), I would expect this to automatically add a "Preferences..." menu option, which would show "Settings here." However, this option never shows up. I also tried replacing #if os(macOS) with #if targetEnvironment(macCatalyst), which had no effect.
Answered by e_belinski in 630568022
Update: It appears that the Settings documentation page has been updated to no longer show compatibility with Mac Catalyst 14.0+. I guess it was a typo.
I have been able to get this working by adding a Settings.bundle to my app. However, this does work differently to what's shown in the demo because the interface is constructed automatically from what's stored in the Root.plist. Anything passed within the closure of Settings seems to be ignored.
I understood the demo a little differently.

The Settings scene will automatically set up the standard Preferences command in the app menu and also give the window the correct style treatment.

While the Settings scene will automatically set up the standard Preferences command in the app menu, it does not automatically set up the preferences window based on the iOS Settings.bundle. But it does style the window (whatever that means??). I understood that we must create the setting pane manually.

My implementation below, also using the new awesomely easy to use @AppStorage property wrapper that invalidates a view on change of the referenced UserDefaults.standard...

Code Block
struct YourTestSettingsApp: App {
    @SceneBuilder var body: some Scene {
        WindowGroup {
            ContentView()
        }       
#if os(macOS)
        Settings {
            SettingsPane()
        }
        #endif
    }
}

then the "Settings" view...

Code Block
struct SettingsPane: View {
    @AppStorage("preference_keyAsPerSettingBundleIdentifier") var kSetting = true
    var body: some View {
        Form {
            Toggle("Perform some boolean Setting", isOn: $kSetting)
                .help(kSetting ? "Undo that boolean Setting" : "Perform that boolean Setting")
        }
        .padding()
        .frame(minWidth: 400)
    }
}

I should note that my implementation is for a native macOS app written in SwiftUI.

It is not an iOS app for Mac built using Catalyst.
Accepted Answer
Update: It appears that the Settings documentation page has been updated to no longer show compatibility with Mac Catalyst 14.0+. I guess it was a typo.
SwiftUI's Settings scene for macOS does not show up on a Catalyst app
 
 
Q