在Xcode 3.x中如何重命名一个工程
在Xcode 3.x没有重命名一个工程的功能,需要我们手动解决。按下列步骤可真正彻底地重命名一个工程:
1、把要命名的工程的文件夹复制或改名成新的工程名;
2、在文件夹内把.pch和.xcodeproj 文件都改名为新的工程名;
3、删除build文件夹;
4、用TextMate或TextWrangler等文本编辑器打开.xcodeproj 文件,这个文件实际上是个文件夹,包含了三个或四个文件。(也可以从右键菜单选择“Show package contents”,这样就会显示这个文件夹中实际包含的文件,然后就可以用普通的文本编辑器打开了);
5、用文本编辑器打开第4步中所打开文件夹中的 <原工程名>.pbxproj 文件,把里面的“<原工程名>”字符串全部替换成新的工程名;
6、用XCode打开这个工程,执行一下Build或?“Clean all targets”操作。如果编译过程报一些错,则可以尝试先关闭XCode,然后重新打开试试。
?
原文出处:http://aplus.rs/programming/how-to-rename-project-in-xcode-3x/
?
======================================
方法二:
?
2. In the project folder, I ran the following command in a terminal, to update the contents of the files in the project:
find . -type f -exec sed -i 's/OldName/NewName/g' "{}" \;3. I opened the now-renamed project in Xcode and clicked Build -> Clean All Targets.
After that, the project (with the new name) built successfully.
?
原文出处: http://encodable.com/tech/blog/2009/05/16/How_To_Rename_An_Xcode_Project