9

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?

6
  • Check this question stackoverflow.com/questions/12848712/…. Do the same steps and use your previous project name in those steps to search.
    – iDev
    Commented Jan 17, 2013 at 18:21
  • I'm not sure where my product name appears in build settings, even after searching.
    – Josh Elias
    Commented Jan 17, 2013 at 18:29
  • I meant follow the answer. Use the same steps. But search for your previous project name there instead of Myapp-temp-caseinsensitive-rename.
    – iDev
    Commented Jan 17, 2013 at 18:33
  • Yes, searching in build settings is one of those steps.
    – Josh Elias
    Commented Jan 17, 2013 at 19:28
  • That was just a comment posted by me. In your case, you cant use it since your project file might have got corrupted due to which you cant open the project. Since your case is different from what was there, I have posted a modified version of the answer here.
    – iDev
    Commented Jan 17, 2013 at 19:50

3 Answers 3

6

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. –

3
  • The question isn't how to do fix it after it crashes, it's why the crash occurs in the first place. Good info anyway though thank you :)
    – Josh Elias
    Commented Jan 18, 2013 at 21:07
  • The reason is because your .pbxproject 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.
    – iDev
    Commented Jan 18, 2013 at 21:24
  • After opening the project.pbxproj file it contains multiple filenames of different viewcontrollers having same name as of my project. And it do not contains a filename with extension .xcodeproj. So what should I do in that case?
    – ViruMax
    Commented May 11, 2015 at 4:37
0

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

1
  • 2
    there is more than just the product name to rename
    – Daniel
    Commented Apr 21, 2015 at 14:50
0

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.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.