xcode 资源未复制到捆绑包

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/25136585/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 05:19:56  来源:igfitidea点击:

Resources not copied to bundle

iosxcodecompilationbundle

提问by Laurent Crivello

I have an XCode project for an iOS application, and added to it 3 small mp3's in the structure that are copied to the destination bundle upon compilation.

我有一个用于 iOS 应用程序的 XCode 项目,并在结构中添加了 3 个小的 mp3,编译时将它们复制到目标包中。

I have then added a bigger mp3's (4MB) to the structure (same folder than the previous ones) and into the Build Phases:
enter image description hereHowever upon compilation, this file is not present in the bundle. I tried to clean and recompile, change destination, but the file is still absent:
enter image description here

然后,我将更大的 mp3 (4MB) 添加到结构(与之前的文件夹相同的文件夹)和构建阶段中:
在此处输入图片说明但是,在编译时,该文件不存在于包中。我试图清理并重新编译,更改目的地,但文件仍然不存在:
在此处输入图片说明

Anything I could have forgotten to check ?

有什么我可能忘记检查的吗?

Thanks.

谢谢。

回答by Retro

Go to your build phase->resources and check these files are showing there or not and check when you add them did you allow them to copy when requiredcheckbox was selected or not.

转到您的构建阶段-> 资源并检查这些文件是否显示在那里,并检查何时添加它们是否允许它们在选中或未选中所需复选框进行复制

回答by nathan z

When you add resources, make sure not only the copy items into destination group's folder (if needed)is ticked, but also tick the corresponding target in the Add to targetslist.

添加资源时,请确保不仅勾选复制项目到目标组的文件夹(如果需要),还要勾选添加到目标列表中的相应目标。