简体   繁体   English

无法打开依赖文件 SwiftStdLibToolInputDependencies.dep

[英]Unable to open dependencies file SwiftStdLibToolInputDependencies.dep

Im working on a iOS objc app with Siri Shortcuts.我正在使用 Siri Shortcuts 开发 iOS objc 应用程序。 I got everything working properly but when I add an Intents Extension (to handle background support) and try to run the app I get an error.我一切正常,但是当我添加一个 Intents 扩展(以处理后台支持)并尝试运行该应用程序时,我收到一个错误。

The IntentHandler of the Intent Extension only has the default implementation. Intent Extension 的 IntentHandler 只有默认实现。

The error:错误:

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)

In Build Phased:在构建阶段:

  • Extension is included in Target Dependencies.扩展包含在目标依赖项中。

  • Extension is included in Embed App Extension.扩展包含在嵌入应用扩展中。

ps: Clearing the DerivedData, clean build, clean project and restarts does not work. ps:清除派生数据、清理构建、清理项目和重新启动不起作用。

I really don't know how to solve this problem.我真的不知道如何解决这个问题。 Hope someone can help me out!希望有人能帮帮我!

Found a solution myself.自己找到了解决办法。

To solve this issue you have to go to Extension > Build Settings and set Always Embed Swift Standard libraries to NO.要解决此问题,您必须转到“扩展”>“构建设置”并将“始终嵌入 Swift 标准库”设置为“否”。

Then clean the project and build the app will make the errors disappear (at least it did for me).然后清理项目并构建应用程序将使错误消失(至少对我来说是这样)。

This worked for me.这对我有用。 In my case, I have a single view iOS app with half a dozen Pod imports.就我而言,我有一个带有六个 Pod 导入的单视图 iOS 应用程序。 Once I set all the targets plus the Pods project to NO, the unable to open dependencies file error went away.一旦我将所有目标和 Pods 项目设置为 NO,无法打开依赖文件错误就消失了。 Didn't even have to clean the folder again.甚至不必再次清理文件夹。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM