I have Xcode Template that generate a bunch of files (not project) with some predefined repetitive code (for example classes for MVVM pattern). When I try to create these files in Xcode Project all works fine (I can find and create my templates in New File…
menu), but when I try to do the same thing in SwiftPM I can't find my templates in the New File…
menu.
All my templates are leaving in ~/Library/Developer/Xcode/Templates/**/*.xctemplate
.
What should I do to show templates for SwiftPM as well?
After some research of
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Templates/
folder I found that some default templates have the propertySupportsSwiftPackage
that set toYES
. I added it to my templates and it finally works.