禁止警告:副本捆绑资源构建阶段无法处理Swift文件 [英] Suppress warning: The Swift file cannot be processed by a Copy Bundle Resources build phase

查看:107
本文介绍了禁止警告:副本捆绑资源构建阶段无法处理Swift文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个应用程序,该应用程序使用包含intentdefinition文件的Swift框架.我使用CocoaPods管理/分发我的框架,因此,为了使Siri成功找到应用程序和扩展,以便她可以响应,我需要添加一个构建阶段"/复制捆绑资源"步骤来复制intentdefinition文件从框架到应用程序的主捆绑包.

I have an app that uses a Swift framework that contains an intentdefinition file. I use CocoaPods to manage/distribute my frameworks, so, in order for Siri to successfully find the app and extension so that she can respond, I needed to add a "Build Phases"/"Copy Bundle Resources" step that copies the intentdefinition file from the framework into the app's main bundle.

请参见此问题

Please see this question and answer for more background about this question.

该应用和扩展程序现在可以正常运行,但是在编译时,我收到针对每种意图的警告:

The app and extension are working properly, now, but at compile time I get warnings for each intent:

"Swift文件 '.../DerivedSources/IntentDefinitionGenerated/* Intents/* Intent.swift' 复制捆绑包资源构建阶段无法处理"

"The Swift file '.../DerivedSources/IntentDefinitionGenerated/*Intents/*Intent.swift' cannot be processed by a Copy Bundle Resources build phase"

虽然该陈述是正确的,但在这种情况下无关紧要,因为框架将处理文件.

While this statement is true, it is not relevant in this case, since the framework will process the files.

如何取消此警告?

推荐答案

检查警告中提到的文件是否在Build Phases > Copy Bundle Resources中.只需从那里删除,警告就会消失.

Check if the files mentioned in the warning are there in Build Phases > Copy Bundle Resources Simply remove from there and warning will be gone.

这篇关于禁止警告:副本捆绑资源构建阶段无法处理Swift文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆