This is NOT a MacCatalyst app or SwiftUI macOS app. But an iOS app with macOS target(As shown below). I'm trying to hide the title bar of the macOS app in this setting.
.windowStyle(HiddenTitleBarWindowStyle())will not work because this is not a traditional macOS app. Thus, the API is not available.titlebar.titleVisibility = .hiddenwill not work because this is
not a catalyst app. In addition, sceneDelegate does not exist in
SwiftUI lifecycle.
I'm trying to look for a solution that works for the case of above screenshot. An iOS app with macOS 11+ as deployment target.
Some user points out that this is a MacCatalyst app. And I had closed the previous question. But after some testing, I can confirm this is indeed NOT MacCatalyst. It's a new way of running iOS app on Mac that is only available on Apple Silicon Mac. MacCatalyst target refers to the Rosetta approach only.
As shown on image below. My question is about hiding status bar on My Mac(Designed for iPad)
Testing code as below. MacCatalyst code only gets called on target Mac(Rosetta)

New API related to my problem is ProcessInfo.processInfo.isiOSAppOnMac. I'm wondering how to hide title in this particular case.

