I have Swift project in which I have installed my SDK by cocoapods.
In Swift project I have configured LOCAL
, STAGING
, and PRODUCTION
schemes.
When I switch schemes, Xcode recognizes which one to compile, but this is woking only on the Swift project but not ObjC.
Is there a way to change only the Swift project configuration, which will work either on swift and SDK which is installed by cocoapods?
This is my code which must be compiled
#if LOCAL
NSLog(@"SDK: local");
#elif STAGING
NSLog(@"SDK: staging");
#else
NSLog(@"SDK: production");
#endif
I have tested and it seems working when I include this in my sdk podspec
s.pod_target_xcconfig = {'GCC_PREPROCESSOR_DEFINITIONS' => 'LOCAL=1'}
but in this way no matter which scheme I use, the SDK only compiles the LOCAL
.
I've seen that some cocoapod libs are installed like this
pod 'LIB', :path => '../../', :configuration => ['Debug']
but in my case this doesn't work.