修改Xcode工程名称(完美版)
2016-11-09 本文已影响8388人
门前有棵葡萄树
-
前段时间项目需求,需要在现有的项目上面开发一个新的项目。如果新建工程的话,会有很多麻烦的问题:
1.虚拟文件夹无法拖拽到新的工程,导致文件杂乱的混在一起难以按模块区分(如果都是实体文件夹可忽略)
2.plis文件需要自己慢慢配置,容易遗漏
3.第三方的link库需要自己一个一个添加,很多设置需要修改,容易遗漏
4.资源文件需要自己拖拽 -
新建项目虽然勉强完成修改工程名的过程,但是很多细节容易遗漏,导致后面开发过程中出现Bug很是费事,于是就自己参考网上资料,自己在现有的工程上面直接修改名字,步骤如下:
1.修改工程名字
.打开工程 点击工程名称 回车 直接修改

.此时会弹出一个对话框,点击Rename

2. 修改scheme名称
.点击Xcode上面的工具栏Product->Sechme->Edit Sechme

.弹出对话框 会车直接修改 修改完成之后 点击Close

3.修改目录名称
.点击工程内需要修改名字的目录 回车直接修改

.点击 Find 选择 查找替换

.点击全部替换

.部分替换不了的 手动点进去修改

4.修改实体文件夹名称
.在文件夹内 将对应的文件夹回车直接修改

5.修改.xcodeproj 右键显示包内容
.你的项目.xcodeproj 右键显示包内容

.双击打开.pbxproj文件

.查找替换全部

6.如果有pod (无pod 忽略)
.删除原来的pod对应的三项

.重新 pod install (注意 不要用 pod install --verbose --no-repo-update )