从Xcode12.3开始,当您创建一个目标为macOS的新SwiftUI项目时,Xcode默认为目标为11.0 (Big Sur)。在不更改默认创建的"hello world“应用程序中的一行代码的情况下,我将目标更改为macOS 10.15 (这是我仍在使用的)默认项目快速文件将不再构建。:-
@main
struct catalinaApp: App {
var body: some Scene {
WindowGroup {
ContentView()
}
}
}```
3 Errors: @main, 'Scene' and WindowGroup is only available in macOS 11.0 or newer
How can I alter the project/above file to correctly build the default app on Catalina? (10.15) ?
thanks in advance!发布于 2020-12-19 03:57:41
感谢@Raja Kishan,答案很简单,在创建新项目时,在生命周期选择中选择App Delegate选项。
https://stackoverflow.com/questions/65362789
复制相似问题