With regard to SwiftUI apps, what are the differences between an Xcode project with one iOS/macOS target using "Optimize Interface for Mac", and a project with separate iOS and macOS targets?

Hello, I come here as an iOS developer asking a bit of a broad question. For the past year, I've been building an app intended for iOS, iPadOS, and macOS. Although written almost entirely in SwiftUI, I have a bit of UIKit in it, specifically a UITextView. (Side note: I've considered using the new SwiftUI TextEditor but it doesn't appear to have the functionality I need.)

When I started, I set up my Xcode project with one target that deploys to iPhone, iPad, and Mac, so that the iPad version could run on Mac as a Catalyst app. Now that I'm building against the iOS 14 beta, I selected "Optimize Interface for Mac" so that my app can look more like a native macOS app on Mac. However, after watching some more of the WWDC 2020 videos, and downloading sample projects, I'm noticing that Apple is clearly favoring separate iOS and macOS targets for SwiftUI projects. And creating a new Xcode project with the "App" template creates two separate targets as well.

Maybe this answer is buried in a WWDC video I haven't watched yet, but I'm trying to understand what exactly are the tradeoffs for having two separate targets. If I switch to using separate iOS and macOS targets, will my app no longer be a Catalyst app? Will it be an AppKit app underneath the SwiftUI instead? And will I not be able to use UITextView on macOS anymore? If I'm already using "Optimize Interface for Mac", are there any benefits to separate targets? Lastly, I noticed that one of the videos mentioned a new simple method to declare a settings window for macOS using #if os(macOS) Settings { SettingsView() } #endif. I have not been able to make this actually show up on my app on macOS Big Sur, would it only work with a separate macOS target?

Thank you so much!
The "Optimize Interface for Mac" is an option for Catalyst. It allows you to build a more native Mac app, while still using Catalyst libraries (so UIKit).

The separate macOS target will build a native Mac app, it uses AppKit APIs.

Also, #if os(macOS) Settings { SettingsView() } #endif is only available on SwiftUI on AppKit, so you have to use the native macOS target in order to use this API.

In my opinion, it always is better to use the native library and build native apps. Especially when you're building an app completely from scratch using SwiftUI, since so many APIs are shared between native SwiftUI on iOS and SwiftUI on Mac.

P.S. Yeah, I do think the SwiftUI's TextEditor is quite limiting. Hopefully it will gain additional features next year. In the meanwhile, consider using NSTextView in NSViewRepresentable if you want to use the native SwiftUI on AppKit.
Thanks @Tom1234 for the clarifications.

If Settings is only available on SwiftUI on AppKit, why does the documentation page say it is available on both macOS 11.0+ and Mac Catalyst 14.0+? (Genuine question, I can see it being a typo in the docs, or a bug as to why I can't get it to show up in my Catalyst app.)
With regard to SwiftUI apps, what are the differences between an Xcode project with one iOS/macOS target using "Optimize Interface for Mac", and a project with separate iOS and macOS targets?
 
 
Q