Project Crashes After Rename

懵懂的女人 提交于 2019-12-10 12:44:29

问题


If I change the name of my iOS project in XCode either in in the navigator view:

What is the equivalent of Project->Rename in Xcode 4

Or in the Inspector, like this:

http://woolybeastsoftware.com/woolyblog/2012/01/22/xcode-4-renaming-projects/

...XCode quits unexpectedly? Anybody run into this problem?

Why does this happen and how can you avoid it?


回答1:


If your Xcode project is corrupted, you can do the following,

  • In finder, right click on your .xcodeproject file and click on show package contents.
  • Then right click on your project.pbxproj and open it in some text editor.
  • Then search for the previous project name which you used and manually rename it to the new name.
  • Save it after changing and then reopen the project.

The reason is because your project.pbxproj file which stores all details related to the project got corrupted which causes the Xcode to not able to parse it and hence it crashes. Ideally this shouldn't happen while renaming, but in your case somehow it got corrupted. –




回答2:


There is a more simpler way: go to Build Settings -> search for "Product Name" and rename it.




回答3:


I got this problem after upgrading to Xcode 6.3. After downgrading to 6.2 it worked fine again. So it seems that some versions of Xcode handle renaming better than others. You find an old version here: https://developer.apple.com/downloads/index.action?name=Xcode Hope this can help someone.



来源:https://stackoverflow.com/questions/14385542/project-crashes-after-rename

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