What is the difference between Copy Bundle Resources and Copy Files for Xcode build phases?

你。 提交于 2019-11-28 07:01:03

问题


Could someone explain the difference between the Copy Bundle Resources phase of Xcode and a Copy Files phase? When would I use "Copy Files"?


回答1:


Copy Bundle Resources phase copies files that you want to be available in your bundle (.app). On the other hand Copy Files phase copies files to other (standard) locations accessible from your application (for example to /Library/Fonts) giving you also the option to copy them only when installing. You can also see relevant documentation here




回答2:


Copy Files - Copies files from a project to an external specified location.

It is useful, for example, when you are creating an Objective-C Static Library where you should expose .modulemap[About] or/and umbrella.h[About] files

Copy Bundle Resources - Copies files that support your source code into internal structure. If you want to make sure the files you added will get copied to the application bundle

It is useful, when you are creating an app where you can add images and other resources

Read more here



来源:https://stackoverflow.com/questions/11163276/what-is-the-difference-between-copy-bundle-resources-and-copy-files-for-xcode-bu

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!