Support Xcode Template Extensions to handle files like Swift GYB

Number:rdar://26823522 Date Originated:2016-06-15
Status:Open Resolved:
Product:Developer Tools Product Version:Xcode 8
Classification: Reproducible:
Xcode should support Template Extensions. These extensions would register a UTI. During the prebuild stage (or whenever a file is modified) they would run on each file with the appropriate UTI in the project. 

The extension interface should support the extension's ability to provide one or more output source or media files that can be included in the project. 

This would be extremely useful for the Swift open source project GYB (generate your boilerplate) files. Currently the generated Xcode project is useless for the Swift standard library because so much code is contained in GYB files so the results aren't known until the build script is actually run. You can't quick-jump, search, or navigate any of the symbols. The resulting .swift files show up as missing files in the Xcode project.

There are plenty of other applications for templating extensions but as a contributor to the Swift open source project this would solve a problem I currently have. I would be more than happy to write the GYB extension and contribute it to the Swift open source project.


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!