首页 > 解决方案 > 无法打开依赖文件 SwiftStdLibToolInputDependencies.dep

问题描述

我正在使用 Siri Shortcuts 开发 iOS objc 应用程序。我让一切正常工作,但是当我添加一个 Intents 扩展(以处理后台支持)并尝试运行该应用程序时,我得到了一个错误。

Intent Extension 的 IntentHandler 只有默认实现。

错误:

Exiting early, found no Swift version in executables.
error: unable to open dependencies file (/.../.../Library/Developer/Xcode/DerivedData/.../Build/Intermediates.noindex/App Name.build/Debug-iphoneos/ShortcutExtension.build/SwiftStdLibToolInputDependencies.dep)

在构建阶段:

ps:清除DerivedData,清理构建,清理项目并重新启动不起作用。

我真的不知道如何解决这个问题。希望有人可以帮助我!

标签: iosobjective-cxcodesirishortcutsxcode-build-settings

解决方案


自己找到了解决方案。

要解决此问题,您必须转到 Extension > Build Settings 并将 Always Embed Swift Standard 库设置为 NO。

然后清理项目并构建应用程序将使错误消失(至少对我来说是这样)。


推荐阅读