xcode在为iphone构建时的资源组和文件夹引用
2012-05-15 11:45
246 查看
其他废话的就不一一翻译了,主要给步骤
1,添加一个文件夹(名字随便起只要不是resources就行)到你的项目里(可以放在resources文件夹下面也可以同目录),然后添加这个文件夹的引用(注意了时 folder reference)
看文件夹的颜色是蓝色的。
2.我做的方法和原文有点不一样,但是目的和结果都时一样的,
首先左击targets下面的一个目标,然后点击build phases 再点击右下角的add build phases
弹出 的三个选项,选择add run script ,然后 shell: /bin/tcsh
script:
touch -cm ${SRCROOT}/../../GameResources
这里的GameResources 是你所建立的文件夹
到此为止,该做的都做了,你再试一试移动你所建立的文件夹的资源是不是有点不一样哈~~
注意:
Before this, you probably used [[NSBundle mainBundle] resourcePath] or pathForResource:. These won’t work anymore, as all your resources are now inside ‘GameResources’ or whatever. [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@”GameResources”] or similar will need to be used instead. 就是这个方法不能再像以前那样用了。
我写的比较凌乱,如果想看得仔细一点就去原文看吧。
http://majicjungle.com/blog/123/
1,添加一个文件夹(名字随便起只要不是resources就行)到你的项目里(可以放在resources文件夹下面也可以同目录),然后添加这个文件夹的引用(注意了时 folder reference)
看文件夹的颜色是蓝色的。
2.我做的方法和原文有点不一样,但是目的和结果都时一样的,
首先左击targets下面的一个目标,然后点击build phases 再点击右下角的add build phases
弹出 的三个选项,选择add run script ,然后 shell: /bin/tcsh
script:
touch -cm ${SRCROOT}/../../GameResources
这里的GameResources 是你所建立的文件夹
到此为止,该做的都做了,你再试一试移动你所建立的文件夹的资源是不是有点不一样哈~~
注意:
Before this, you probably used [[NSBundle mainBundle] resourcePath] or pathForResource:. These won’t work anymore, as all your resources are now inside ‘GameResources’ or whatever. [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@”GameResources”] or similar will need to be used instead. 就是这个方法不能再像以前那样用了。
我写的比较凌乱,如果想看得仔细一点就去原文看吧。
http://majicjungle.com/blog/123/
相关文章推荐
- Xcode7.2版本以上引用文件夹,出现蓝色文件夹
- Xcode项目引入外部文件夹,不能引用问题
- Xcode项目引入外部文件夹,不能引用问题
- XCode引用的外部文件夹不能叫Resources
- xcode iphone模拟器所在文件夹
- Xcode项目引入外部文件夹,不能引用问题
- Xcode项目引入外部文件夹,不能引用问题
- xcode4.3 构建ipa包发布到iphone
- iPhone系统常用文件夹位置(28个系统常用路径)
- xcode iphone simulator path 模拟器路径 mac 显示系统文件 隐藏系统文件
- iPhone系统常用文件夹位置
- Xcode证书破解 iphone真机部署
- VS项目重命名工具,不再为重命名项目,命名空间,文件夹,相互引用关系而烦恼
- 如何在Xcode 4.2 下进行 iPod touch 2代、iPhone 3G等设备的真机调试(转)?
- maven如何将项目引用的所有jar包复制到lib文件夹内
- iPhone 真机调试 ( Xcode 3.2.5 + iOS SDK 4.2.1 )
- xcode 蓝黄文件夹
- Xcode 利用宏定义区分iphone 模拟器和真机
- xcode 6 如何将 模拟器(simulator) for iphone/ipad 转变成 simulator for iphone