Q: Add compiler flag dependency for Framework project into main project I am working on a framework project where I have some settings. Based on these settings some behaviour will change. But this will be decided by the framework user. For say I have a method in framework like bellow:
+ (void)printCompilerFlag {

if (OC_LOG_ENABLED == 0)
    NSLog(@"OC_LOG_ENABLED disabled");

else
    NSLog(@"OC_LOG_ENABLED enabled");

}
When the user add this framework into their project they should be able to handle this with their project by adding the flag OC_LOG_ENABLED=0 or 1.
Any suggestion or on hand tutorial is highly appreciable.
thank you.
n.b:sorry for the code snippet, the macro condition did not work here.

A: I can give you some suggestions based on my RD:
i. Create one Singelton class to .Framework project:
// ProjectManager.m file:
      + (instancetype)sharedManager
    {
        static ProjectManager *manager = nil;
        static dispatch_once_t onceToken;
        dispatch_once(&onceToken, ^{
            manager = [ProjectManager new];

        });
        return manager;
    }


    //Singleton function setter:
    - (void)setOs_log_enabled_status:(BOOL)os_log_enabled_status
    {
        _os_log_enabled_status = os_log_enabled_status;
        if (_os_log_enabled_status == false)
        {
            NSLog(@"OC_LOG_ENABLED disabled");
        }
        else
        {
            NSLog(@"OC_LOG_ENABLED enabled");
        }

    }

//Or

    - (void)printCompilerFlag 
    {
       if (_os_log_enabled_status == 0)
       NSLog(@"OC_LOG_ENABLED disabled");
       else
       NSLog(@"OC_LOG_ENABLED enabled");
    }

Project manager header file only get visible once you generated as Framework. 
//ProjectManager.h file
@interface ProjectManager : NSObject

+ (instancetype)sharedManager;

//os_log bool value to handle your requirement
@property (nonatomic,assign) BOOL os_log_enabled_status;
//function
- (void)printCompilerFlag;

@end

ii. Make sure you have selected this header file as Public file on: 
Build Phases->Headers drag ProjectManager.h from Project to Public.
iii. Demo usage:
  //Appdelegate.m file
    #import <YourFramework/ProjectManager.h>

    @implementation AppDelegate

    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    //Depends on user status false or true
     [ProjectManager sharedManager].os_log_enabled_status = false;
    //or
     [ProjectManager sharedManager].os_log_enabled_status = true;

    //After setting BOOL value call this function
     [ProjectManager sharedManager] printCompilerFlag];
    return true;
    }

    @end

Hope this will give you some idea to handle the framework classes. 
