Xcode template for importing a file by file path

I have an Xcode template file:

#import "___FILEBASENAME___.h" @implementation ___FILEBASENAMEASIDENTIFIER___ @end 

This will create an example file, for example:

 #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 created ExampleFile.m inside the Path/To/ folder. Then my desired result is:

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

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

I also attacked the ___DIRECTORY___ link here , but it doesn't seem to work for me when I tried to use it.

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

+5
source share
1 answer

Try to enable the option "Use custom working directory", it will allow you to choose the base directory. How to include this, the answer to the next question. Xcode: How to set the current working directory to the relative path for the executable?

Hope this helps

+1
source

Source: https://habr.com/ru/post/1269353/


All Articles