What I finished doing:
I have two functions: 1 and 2.
So, my requirements will be made by three types of assembly :
- String with only function 1.
- String with only function 2.
- An assembly that has both functions 1 and 2.
So, I split the project files in Xcode as:
CommonModule - This group consists of the files required for both functions.ModuleOne : This group consists of the files that are required for the function.ModuleTwo : this group consists of files that are required for two functions.
The folder structure for which I ran for each module:

It is better to keep the project folder structure on disk, similar to the group structure of this project. This reduces confusion, and it becomes possible to add all files to a specific folder to a specific group. .
Now I have identified three goals that correspond to the three types of lines listed above.
TargetOne : Files in CommonModule and ModuleOne belong to this target.TargetTwo : Files in CommonModule and ModuleTwo belong to this target.TargetAll : Files from the CommonModule , ModuleOne and ModuleTwo groups are for this purpose.
Now in CommonModule I have a BuildConfig.h file with macros like:
#define IncludeModuleOne 1 #define IncludeModuleTwo 1
So, when building, select the appropriate target and accordingly switch the above switches to get the correct build.
Now in InitialViewController.m I checked the values โโof the switch, and depending on the values, I showed / hid the menu options for this particular function.
Thus, to summarize, I include only the required files in the assembly using several targets + configuration macros together
In the near future I will talk about a link to my sample project on GitHub. Hope this helps someone who has similar requirements. Thank you
source share