1

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?

HangarRash
  • 7,314
  • 5
  • 5
  • 32
pacification
  • 5,838
  • 4
  • 29
  • 51

1 Answers1

2

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 property SupportsSwiftPackage that set to YES. I added it to my templates and it finally works.

enter image description here

pacification
  • 5,838
  • 4
  • 29
  • 51