74

When creating a project in Xcode 4, it asks what Class prefix to add to all new files.

Is there a way to change (or remove) this, after a project is already started?

idmean
  • 14,540
  • 9
  • 54
  • 83
TigerCoding
  • 8,710
  • 10
  • 47
  • 72

3 Answers3

150

In Xcode 4.3 at least it is persistent. To change it click on your project then in the right hand menu there is an option to change it. If you don't have the right hand menu open hit the button up at the top to make it appear.

enter image description here

odyth
  • 4,324
  • 3
  • 37
  • 45
19

To add class prefix or change prefix for a project

enter image description here

While adding new files to the project, we get the filename with the prefix where we can append the rest of the filename.

enter image description here

Hope this will help you :)

Aswathy Bose
  • 4,279
  • 4
  • 32
  • 44
6

Outdated Answer - Recent versions use this prefix for all new classes now.

This only affects the files created from a project template when you create a new project. It's not a persistent setting and has no affect when creating new files.

Joshua Nozzi
  • 60,946
  • 14
  • 140
  • 135
  • 1
    Yes, I see. Don't know why I thought that. =) – TigerCoding Nov 09 '11 at 18:24
  • 1
    Maybe you read the same things I did - the complaints about no name spaces in Objective-C. It's what made *me* think this prefix option was a persistent thing. I reasoned Apple was trying to make it easier to keep consistent with class name prefixes as a bandaid. But then I couldn't find the setting anywhere (and a string search of the project file didn't turn it up either). – Joshua Nozzi Nov 09 '11 at 18:37
  • See Odyth's response (+1). It's now the correct response. Prior to 4.3, only the files created from project templates were graced by the chosen class prefix. 4.3 and greater now use this prefix pervasively. – Joshua Nozzi Mar 31 '12 at 22:12
  • 1
    I've changed the correct answer, but up-voted Joshua's as his was the correct response at the time. – TigerCoding Apr 03 '12 at 00:35