大佬教程收集整理的这篇文章主要介绍了xcode – 子目录中的资源文件被复制到应用程序包的根目录,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
>在项目的根文件夹下创建资源文件夹.
将资源文件夹拖动到XCode,该文件夹为文件夹创建一个组.
>将我的资源文件从Finder拖到XCode中的resources文件夹.
现在我可以看到Build Phrases-> Copy Bundle resources中列出的所有资源文件.
奇怪的是[[NSBundle mainBundle] pathForresource:@“book”ofType:@“epub”]返回可以找到的文件路径,而[[NSBundle mainBundle] pathForresource:@“book”ofType:@“epub” inDirectory:@“resources”]返回(null).
从构建结果窗口,我注意到这一行:
Cpresource MBookReader/resources/book.epub /Users/neevek/Library/Developer/Xcode/DerivedData/workspace-fykuaikryknuhxgevcdtspkspptj/Build/Products/Debug-iphonesimulator/MBookReader.app/book.epub cd /Users/neevek/workspace/xcode_projects/MBookReader setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhonesimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" builTin-copy -exclude .DS_Store -exclude CVS -exclude .svn -exclude .git -exclude .hg -resolve-src-symlinks -Strip-tool /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/Strip /Users/neevek/workspace/xcode_projects/MBookReader/MBookReader/resources/book.epub /Users/neevek/Library/Developer/Xcode/DerivedData/workspace-fykuaikryknuhxgevcdtspkspptj/Build/Products/Debug-iphonesimulator/MBookReader.app
这表明资源/ book.epub文件确实被复制到MBookReader.app/(应用程序包的根目录).
以上是大佬教程为你收集整理的xcode – 子目录中的资源文件被复制到应用程序包的根目录全部内容,希望文章能够帮你解决xcode – 子目录中的资源文件被复制到应用程序包的根目录所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。