How to change an iPhone App name from XCode

Problem:

Changing a project name (or an app name) for a project you’re developing in XCode can become a cumbersome task, with random errors showing up and the old name appearing when you least expect it. I’ve come up with a method that seems to be effective in doing a complete rename and ensuring it “takes”…

Solution:

The following is my “foolproof” way of changing the name of an XCode app in development. It’s pretty much the easiest, and most consistent way that I’ve found to do it.

The key is knowing that every file in an XCode project is either an XML file, or a straight text file (like a class).

Part of what helps is that I tend to name projects (and apps) simple one-word names (like Pinhole, Contraculate, or the soon-to-be-released Putterball).

I start by renaming all of the files with the old app name to the new app, such as:

(from)

testApp_Prefix.pch
testApp.xcodeproj
textAppViewController.xib
Classes/testAppAppDelegate.h
Classes/testAppAppDelegate.m
Classes/testAppViewController.h
Classes/testAppViewController.m

(to)

newApp_Prefix.pch
newApp.xcodeproj
newAppViewController.xib
Classes/newAppAppDelegate.h
Classes/newAppAppDelegate.m
Classes/newAppViewController.h
Classes/newAppViewController.m

Control-click the newApp.xcodeproj file. One of the options will say “Show Package Contents”. Drag these files into TextEdit to open them.

Then, I drag *every* other file (except the .xcodeproj) into TextEdit.

Once they’re all open, I do a Find-Replace All (from “testApp” to “newApp”) and I save each file.

This is a manual process, but it seems the easiest way to ensure that the new app name is taken (and the old one is completely blown out). I’ve tried a number of different techniques that I had found on the internet, but this is simply the most effective (for me, anyway).

jeffrey

About jeffrey

Jeffrey Berthiaume is a multimedia developer and internet architect who has designed and built award-winning websites, kiosks, and content management systems. He bridges the gap between creative and technology with an ability to balance the needs of designers and marketing with the capabilities of existing technology.
This entry was posted in iOS, Tutorials. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>