Xcode template to import file by file path

Viewed 308

I have a Xcode template file like so:

#import "___FILEBASENAME___.h"

@implementation ___FILEBASENAMEASIDENTIFIER___
@end

This will create an example file like so:

#import "ExampleFile.h"

@implementation ExampleFile
@end

However due to some complexity in our build system, I need to import files by their file path.

For example, if I was creating ExampleFile.m inside of Path/To/ folder. Then my desired output would be:

// Desired template output
#import "Path/To/ExampleFile.h"

I tried looking through some Apple example templates, but didn't seem to find a way to make it work.

I also stumpled upon ___DIRECTORY___ referenced here, but it doesn't seem to work for me when I attempted to use it.

Does anyone know if there is a way to accomplish this?

1 Answers
Related