I am creating a framework that uses the preprocessor flag in one of the methods. Something like the following code:
public func heyStuck(overflow: String) {
#if DEBUG
print(overflow)
#else
print("¯\\_(ツ)_//¯")
#endif
}
The fact is that I use Cocoapods to import my framework, so in order to define the DEBUG flag for the framework, I have to do something similar in my application subpixel:
post_install do |installer_representation|
installer_representation.pods_project.targets.each do |target|
target.build_configurations.each do |config|
if config.name != 'Release'
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= ['$(inherited)', 'DEBUG=1']
end
end
end
end
Is there any way to add this information to the podspec file in order to avoid applications to define this thing in my subfile?
user6219996
source
share