Skip to main content

Coding with Jeff

Quick Tip: Renaming your project

If you’re anything like me, when you come up with an idea for a project, the first thing you have to do is figure out a name. This is seriously difficult in a lot of cases. I want something clever but also not so clever that people don’t get it. But it also needs to be short and memorable. Most of the time, this is as far as I get. I can’t think of a good project name, and so the project dies.

I’m going to show you a little feature in Xcode that makes it super easy to rename your entire project, without worrying about missing bits here and there, so needing the perfect name up front will no longer be necessary. I’ve created a sample project called “Codename” to walk you through it.
The first step is to open the inspector panel, and click on the project file in the navigator. On the “Identity and Type” tab, you’ll see a field for “Name”.
You can change this to whatever you want the project to be named, and Xcode will open up a refactor window, allowing you to see which items it’s going to rename. Click the “Rename” button, and Xcode will go ahead and rename a bunch of items. (Yes, Xcode 12 beta has a few visual issues here 🤷🏻‍♂️)
Now all that’s left is to change your bundle ID (if you want) and your source files.
And that’s it! Now you don’t have to worry about coming up with the perfect name before diving into some code for your next project, so why not get started? 😄