Reputation: 33126
In Xcode 3, we worked out (by trial and error) that we could COPY the system templates to a new location (three possible locations, because Apple kept changing it), and customize them.
NB: while writing this question, I discovered most of the answers on StackOverflow on this topic are incorrect :(. Apple changed the locations, most answers give the old locations, which don't work any more.
At Xcode 4.3, Apple broke it all again, and now FILE TEMPLATES CANNOT BE CHANGED by the old method. From trial and error, I've found that you can create NEW file templates (see below), but the existing ones from Apple cannot be replaced.
How do we fix this? Apple's New File templates are simply appalling - they insert fake "copyright" lines, and they don't even follow Apple's own documentation standard, let alone anyone else's :(.
Upvotes: 3
Views: 4429
Reputation: 33126
This is only a partial answer to the question, but for anyone else struggling (like me) to work out the "correct" way, here's a workaround that partially works.
Today, with Xcode 4.5.0, the following works:
Customize file/project templates:
~/Library/Developer/Xcode/Templates
(the parent folder should already exist - Xcode4 auto-creates it)[Xcode4.app]/Contents/Developer/Library/Xcode/Templates
[Xcode4.app]/Contents/Developer/Platforms/iPhoneOS.Platform/Developer/Library/Xcode/Templates
NB: in step 2 above, you can also ALLEGEDLY create that folder at:
~/Library/Application Support/Shared/Xcode/Templates
...but that never works for me, and the parent folder doesn't exist with new installs of Xcode 4.5, so I suspect Apple is phasing this out? (since they refuse to document it, I'm just guessing)
Upvotes: 9
Reputation: 56
It seems project templates can be in ~/Library/Developer/Xcode/Templates/Application/Project Templates
.
source: https://github.com/AFNetworking/Xcode-Project-Templates
Upvotes: 1