41

How can I change the "Created by" when making a new file in Xcode 6.x? Im using Mac OSX 10.10 Yosemite

The old way doesn't work:

  1. Updating the "current" Address Book name.
  2. defaults write com.apple.Xcode PBXCustomTemplateMacroDefinitions {"FULLUSERNAME" = "Name Here";}

enter image description here

jww
  • 97,681
  • 90
  • 411
  • 885
user023
  • 1,450
  • 2
  • 17
  • 21
  • The template file I have uses `«FULLUSERNAME»`, not `_username_`. Try fixing your template file. – rmaddy Oct 23 '14 at 18:20
  • @rmaddy i've just replaced my real name with _username_ – user023 Oct 23 '14 at 18:22
  • Huh? Replaced it where? I'm using Xcode 6 and when I create new files, templates that contain `«FULLUSERNAME»` get replaced with my actual name. – rmaddy Oct 23 '14 at 18:24
  • Where and how can I modify the "template" file? – user023 Oct 23 '14 at 18:26
  • Isn't that the template file in your question? – rmaddy Oct 23 '14 at 18:27
  • Its just the header ? – user023 Oct 23 '14 at 18:29
  • But is it the header of your template file or is the result of creating a new file from a template? Where did `_username_` come from? – rmaddy Oct 23 '14 at 18:30
  • This is the result of creating a new a new file from a template. When creating a new file the header says my full name but I just replaced the fullname with "_username_" for the sake of the screenshot – user023 Oct 23 '14 at 18:34
  • Now I'm really confused. So the resulting file actually did show your actual name. So what's the problem then? – rmaddy Oct 23 '14 at 18:35
  • I just want to be able to change it to something else.. like anything :) – user023 Oct 23 '14 at 18:36
  • Correct answer can be found here: http://stackoverflow.com/a/27074406/2341744 – user023 Mar 26 '15 at 12:54
  • possible duplicate of [XCode - Change Company Name and Username](http://stackoverflow.com/questions/10245689/xcode-change-company-name-and-username) – Sega-Zero Jun 15 '15 at 14:17

2 Answers2

58

you can try:

System Preferences --> Users & Groups --> choose current User --> unlock -->right tap current User --> Advanced option --> change you full name & above account name to your want, save ,that is ok!

I get it from How does Xcode know who the the project was "created by"? @Juzzz 's answer.

hope that will help.

Community
  • 1
  • 1
fengsheng
  • 581
  • 5
  • 4
12

In Xcode9 Apple added FILEHEADER text macro to allow you to do just that.

serhat sezer
  • 1,330
  • 1
  • 10
  • 26
  • 9
    In case you're wondering how to actually implement that, here's a great article by [Ole Begemann](https://oleb.net/blog/2017/07/xcode-9-text-macros/) – Jalakoo Mar 07 '18 at 07:52