【发布时间】:2021-01-22 09:41:57
【问题描述】:
我正在尝试创建一个全新的 XCode 项目,我可以在模拟器上运行它,但在画布上显示:Cannot preview in this file - active scheme does not build this file
如果最重要的是我开始添加 macOS 支持,它会说:
'appName' is annotated with @main and must provide a main static function of type () -> Void or () throws -> Void.它还说:
Cannot find type 'App' in scope
Cannot find type 'Scene' in scope
关于 mac 支持,我正在阅读有一个 workaround,即使我尝试过并且错误仍然存在。
关于主动方案,我读过this,但没有帮助。我的意思是......新项目中只有一个方案,它是自动选择的
我假设一个简单的 hello world 项目可以工作,这是怎么回事?
【问题讨论】:
标签: swift xcode swiftui macos-catalina xcode12