Open J-Swift opened 8 years ago
Interesting. I'm not sure what's going on either. Obviously, sometimes things change between Xcode releases. I'll take a look and see if I can figure out why.
I copied the unmodified templates and they still aren't showing up as available templates, so something else is needed here. Requires a bit more digging...
Cocoa Touch template can be found from:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Templates/File Templates/Source
.
There are also some other iOS related templates.
xctemplates.rb copying part needs to be updated. Rest of the process(updating headers part of the script and copy-templates.rb) works fine.
Another thing: copying part does not cover all the templates. I would recommend including templates from /Other
and /Resource
folders as-well. And make sure that header replacing works with all file types.
@antskaar thanks for the recommendations!
By default there is no Cocoa touch class templates in File Templates. You can find the templates on a github project https://github.com/jdg/Xcode-File-Templates or at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Templates/File Templates/Source
. You'll need to add these manually and then run the script.
Hi! I've used custom templates I generated for a while now (at least a year or two), but just got a new computer and didn't carry over what I generated. When I went through to regenerate templates, I noticed that the script isn't able to make available a handful of templates that we generate.
I'm specifically concerned with the 'Cocoa Touch Class' option when generating a new file, but the others might be useful too. I attempted to track down the root cause, but didn't see anything that might be affecting this. The templates are generated just fine, it just seems that Xcode 7.2.1 doesn't seem to want to show the template, probably due to plist issues? The 'Cocoa Touch Class' plist is so minimal, that I can't think of what could be going wrong.
Directory listings:
XCode Screenshots: