swift - 此版本的 watchOS 不支持 WatchKit 1 应用程序。退出 "(null)"

标签 swift xcode swiftui swift5 watchos

我已将我的 watchOS (swiftUI) 项目从 Intel mac 2016 转移到 Mac M1 2020。项目在 Intel mac 上运行良好,但在 M1 应用程序上启动后开始崩溃,并在控制台日志中显示此错误消息。

此版本的 watchOS 不支持 WatchKit 1 应用程序。退出“(null)”

最佳答案

我遇到了同样的问题。

在我的情况下,Watch App target 上的一切都已正确设置。

但是在 Watch Extension 下,Excluded Architectures 部分有一个“arm64”条目。

删除该条目解决了问题(因为 M1 模拟器是 arm64)。

关于swift - 此版本的 watchOS 不支持 WatchKit 1 应用程序。退出 "(null)",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67380107/

相关文章:

ios - 如何与 1 名以上的开发人员一起处理 XCode 项目

iOS 和 .plists

ios - 将 .environmentObject 与呈现为工作表的 View 一起使用会导致 onReceive 不触发/与 @EnvironmentObject 冲突

swift - 自定义框架存档失败

ios - 为什么我在 swift 中收到错误 'No such module FirebaseUI'?

debugging - Xcode 6 : How to Disable Optimisation (Swift)

ios - 错误(Xcode): File not found:/Applications/Xcode.应用程序/内容/开发者/工具链/XcodeDefault.xctoolchain/usr/lib/arc/libarclite_iphonesimulator.a

SwiftUI Tabbar 在选项卡的 View 中保留 navigationBarTitle 位置

ios - SwiftUI 提示 Type of expression is ambiguous without more context in navigationBarItems leading

ios - swift 4 错误 : "Cannot convert value of type ' URLRequest' to expected argument type 'URL!' "