← Changing our course

 

Renaming your XCode project

Hi, everyone!

As we've changed our course slightly, I had to either create a new project or reuse existing one. I've decided not to waste time and reuse existing one. But faced some problems. Renaming a project in XCode is not as easy as it could be.

You have to walk a bunch of steps, to rename your project:

  • Rename your .xcodeproj file and open it in XCode.
  • Rename your -Info.plist from XCode.
  • Rename your _Prefix.pch from Xcode.
  • Rename your AppDelegate.h and AppDelegate.m from XCode.
  • Change your AppDelegate.h @interface name correspondingly.
  • Change your AppDelegate.m @implementation.
This things was almost obvious, and now the tricky ones:
  • Rename your main target in Targets tree.
  • Open every .xib files you use and check class names for everything. Especially in Main Window .xib file where your AppDelegate is mentioned.
  • Right click on main target in Targets tree. And go to Get Info. Type .pch in search box and change the name of linked .pch file in "GCC_PREFIX_HEADER". Clear search field and type .plist there. Now change .plist file in "Info.plist File" under "Packaging" category. And the most significant one change "Product Name" under "Packaging".

That's all you have to do to rename your Xcode project. At least I hope I haven't forgot something. :-)

Cheers!

Comments

Leave a reply »

 
Leave a Reply
 
 
 
 
 
 
Twitter (@ExtraVertex)
Twitter ( we are following )
Blank column :-)